Nicholas Porter
1 min readJan 21, 2020

--

I’m actually very surprised that the concatenation (+ string method) was the fastest, but I can’t think of any faster way.

Maybe you can also test the .concat()` method and the array .join()`.

Also using a Buffer ?

This S.O. post already answers it (they’re all slower), but it would be interesting to see it in this post as well if you’re going to make a comparison.

--

--

Nicholas Porter
Nicholas Porter

No responses yet