Typed Arrays: set vs. indices

JavaScript performance comparison

Revision 3 of this test case created

Preparation code

 
<script>
Benchmark.prototype.setup = function() {
    var m44 = new Float32Array(16);
    var dm44 = new Float32Array(16);
   
   
};
</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
set
dm44.set(m44);
 
pending…
loop
for (var i = 0; i < 16; ++i)
    dm44[i] = m44[i];
 
pending…
explicit
dm44[0] = m44[0];
dm44[1] = m44[1];
dm44[2] = m44[2];
dm44[3] = m44[3];
dm44[4] = m44[4];
dm44[5] = m44[5];
dm44[6] = m44[6];
dm44[7] = m44[7];
dm44[8] = m44[8];
dm44[9] = m44[9];
dm44[10] = m44[10];
dm44[11] = m44[11];
dm44[12] = m44[12];
dm44[13] = m44[13];
dm44[14] = m44[14];
dm44[15] = m44[15];
 
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