concat vs protoconcat

JavaScript performance comparison

Test case created

Preparation code

 
<script>
Benchmark.prototype.setup = function() {
    var array1 = ['value1', 'value2', 'value3'];
    var array2 = ['value4', 'value5', 'value6'];
    var array3 = ['value7', 'value8', 'value9'];
};
</script>

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
array concat
array1.concat(array2, array3);
pending…
prototype concat
Array.prototype.concat.call(array1, array2, array3);
pending…

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

Compare results of other browsers

0 comments

Add a comment