_.indexOf pr2105

JavaScript performance comparison

Test case created by dev

Preparation code

<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.2/underscore.js"></script>
<script src="https://cdn.rawgit.com/jashkenas/underscore/1bbccb69ea7235f3c1feddfb12a491f40a67e780/underscore.js"></script>
<script>var pr = _.noConflict();</script>
      
<script>
Benchmark.prototype.setup = function() {
  var array = _.range(1000);

};
</script>

Preparation code output

Test runner

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

Java applet disabled.

Testing in CCBot 2.0.0 / Other 0.0.0
Test Ops/sec
1.8.2
var r = _.indexOf(array, 999);
pending…
pr
var r = pr.indexOf(array, 999);
pending…

Compare results of other browsers

Revisions

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

0 Comments