aetbalkfjgo;iauwer

JavaScript performance comparison

Test case created

Preparation code

 
<script>
Benchmark.prototype.setup = function() {
    var isArray = Array.isArray;
   
    var obj = {
      isArray: isArray,
      f1: function(arr) { return isArray(arr); },
      f2: function(arr) { return this.isArray(arr); }
    }
};
</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
1
obj.f1([1, 2, 3]);
obj.f1('hello');
pending…
2
obj.f2([1, 2, 3]);
obj.f2('hello');
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