3 ms·
I've done a lot of testing on creating strings by concatenation and it turns out that + is actually one of the slowest. It's much faster, for example, to create
by latortuga 17y ago
I've done a lot of testing on creating strings by concatenation and it turns out that + is actually one of the slowest. It's much faster, for example, to create an array and then join it with "". Maybe try that in your test and see how it compares.
Example:
x = []
x.push("latortuga")
x.push(" is so right")
str = x.join("")