FROM vs String (v4)

Revision 4 of this benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
from


Array.from({length:20},
  () => String.fromCharCode(
    97 + Math.random()*25
  )
).join('')
ready
string
let l = 20;
let str = '';
while(l--){
	str += String.fromCharCode(97 + Math.random()*25)
}
ready
string for-loop
let str = "";
for (let i = 0; i <= 20; ++i) {
	str += String.fromCharCode(97 + Math.random()*25)
}
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.