Float32Array Performance Set (v2)

Revision 2 of this benchmark created by Steven Sell on


Setup

var buffer = new Float32Array(256);
  var overwrite = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16];

Test runner

Ready to run.

Testing in
TestOps/sec
Manual Set (for)
for(let i = 0; i < 16; ++i)
{
    buffer[128 + i] = overwrite[i];
}
ready
Manual Set (while)
let i = 16;

while(i--)
{
    buffer[128 + 1] = overwrite[i];
}
ready
Provided Set
buffer.set(overwrite, 128);
ready

Revisions

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

  • Revision 2: published by Steven Sell on