Typed array iteration

JavaScript performance comparison

Revision 35 of this test case created by Jerry Vigil

Preparation code

<script>
  var static = new Array(500);
  var dynamic = [];
  var dynamicFloat64 = new Float64Array();
  var staticFloat64 = new Float64Array(500);
</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
Static
for (var ii = 0; ii < 500; ++ii) {
  static[ii] = 3.14159;
}
pending…
Dynamic Float64
for (var ii = 0; ii < 500; ++ii) {
  dynamicFloat64[ii] = 3.14159;
}
pending…
Static Float64
for (var ii = 0; ii < 500; ++ii) {
  staticFloat64[ii] = 3.14159;
}
pending…
Dynamic
for (var ii = 0; ii < 500; ++ii) {
  dynamic[ii] = 3.14159;
}
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. Here’s a list of current revisions for this page:

0 comments

Add a comment