array-object-sparse

JavaScript performance comparison

Test case created by galambalazs

Preparation code

<script>
  var arr1 = [];
  arr1[100000000] = "rubbish";
 
  var arr2 = ["value"];
 
  var obj = {
   "100000000": "value"
  };
 
  var ret;
</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 sparse
ret = arr1[100000000];
pending…
array normal
ret = arr2[0];
pending…
object
ret = obj[100000000];
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