concat/join-with-push/join-without-push/TextDecoder (v214)

Revision 214 of this benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
concat
let len = 100
for (var res = '', i = 0; i < len; i++) {
 res += 'a';
}
ready
join-with-push
let len = 100
for (var res = [], i = 0; i < len; i++) {
 res.push('a');
}
res = res.join('');
ready
join-without-push
let len = 100
for (var res = [], i = 0; i < len; i++) {
 res[i] = 'a';
}
res = res.join('');
ready
TextDecoder
let len = 100
let res = new Uint16Array(len)
for (let i = 0; i < len; i++) {
  res[i] = 'a'.charCodeAt(0);
}
let str = new TextDecoder('utf-16').decode(res)
ready

Revisions

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