Uint32Array read performance

JavaScript performance comparison

Revision 5 of this test case created by Chris Khoo

Preparation code

 
<script>
Benchmark.prototype.setup = function() {
    var n = 100000;
    var array = new Array(n);
    var uint32Array = new Uint32Array(n);
    for (var i = 0; i < n; i++) {
      array[i] = n;
      uint32Array[i] = n;
    };
};
</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
Normal array
for (var i = 0; i < n; i++) {
  array[i];
};
pending…
Uint32 array
for (var i = 0; i < n; i++) {
  uint32Array[i];
};
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