arraytypesread

JavaScript performance comparison

Test case created

Info

Read tests about different array types

Preparation code

 
<script>
Benchmark.prototype.setup = function() {
    var sectorcount = 48;
    var sectorsize = 512;
    var cnt = sectorsize * sectorcount;
    var aru = new Uint8Array(cnt);
    var arn = new Array(cnt);
    var rand = Math.floor(Math.random() * (cnt + 1))
   
    for (i = 0; i < cnt; i++) {
      aru[i] = 0xff;
      arn[i] = 0xff;
    }
};
</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
Read Array
var a = arn[rand];
pending…
Read Uint8Array
var a = aru[rand];
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