Sequences in JS

JavaScript performance comparison

Test case created

Preparation code

<script src="//documentcloud.github.io/underscore/underscore-min.js"></script>
<script>
Benchmark.prototype.setup = function() {
    var $ = Function.prototype.call;
    var __ = Function.prototype.apply;
};
</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 5
Array.apply(null, Array(5)).map(Function.prototype.call.bind(Number))
pending…
Array 5.1
$.call(__, Array, 0, new Array(5)).map($, parseInt)
pending…
Array 5000
Array.apply(null, Array(5000)).map(Function.prototype.call.bind(Number))
pending…
Array 5000.1
$.call(__, Array, 0, new Array(5000)).map($, parseInt)
pending…
Underscore 5
_.range(5)
pending…
Underscore 5000
_.range(5000)
pending…
Array 100
Array.apply(null, Array(100)).map(Function.prototype.call.bind(Number))
pending…
Array 100.1
$.call(__, Array, 0, new Array(100)).map($, parseInt)
pending…
Underscore 100
_.range(100)
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