Typed array iteration

JavaScript performance comparison

Revision 38 of this test case created

Preparation code

<script>
  var og = new Array(4);
  var buffer = new ArrayBuffer(128)
  var int8 = new Int8Array(buffer);
  var int16 = new Int16Array(buffer);
  var int32 = new Int32Array(buffer);
  var ob = {a: 0
           ,b: 0
           ,c: 0
           ,d: 0
           };
</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
Vanilla
for(var i=0, a=og; i<4; ++i) {
 a[i] = i;
}
pending…
Int8
for(var i=0, a=int8; i<4; ++i) {
 a[i] = i;
}
pending…
Int16
for(var i=0, a=int16; i<4; ++i) {
 a[i] = i;
}
pending…
Int32
for(var i=0, a=int32; i<4; ++i) {
 a[i] = i;
}
pending…
Assign Variables
ob.a=0;
ob.b=1;
ob.c=2;
ob.d=3;
 
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