array vs uint32array

Benchmark created on


Setup

var total = 1000;
    var a = new Array();
    var b = new Uint16Array(total);
    for(var i=0; i<total; i++){
    a[i] = i;
    b[i] = i;
    }

Test runner

Ready to run.

Testing in
TestOps/sec
access array
for(var i=0; i<total; i++){
a[i];
}
ready
access Uint32array
for(var i=0; i<total; i++){
b[i];
}
ready
set Array
for(var i=0; i<total; i++){
a[i] = i;
}
ready
set Uint32array
for(var i=0; i<total; i++){
b[i] = i;
}
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.