Repeating Character (v33)

Revision 33 of this benchmark created by Rodrigo Ângelo on


Preparation HTML

<script>
  var n = 1000, c = "*";
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
For Loop
for (var e = ''; e.length < n;)
  e += c;
return e;
ready
Array Join
return Array(n).join(c);
ready
Object join
return Array.prototype.join.call({
  length: n
}, c);
ready

Revisions

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