Iterate Array

Benchmark created by Iterate Array on


Setup

var foo = new Uint32Array(1920 * 1080);

Test runner

Ready to run.

Testing in
TestOps/sec
y then x
for (var y = 0; y < 1080; ++y)
{
    for (var x = 0; x < 1920; ++x)
    {
        foo[y * 1920 + x] = y * 1920 + x;
    }
}
ready
x then y
for (var x = 0; x < 1920; ++x)
{
    for (var y = 0; y < 1080; ++y)
    {
        foo[y * 1920 + x] = y * 1920 + x;
    }
}
ready

Revisions

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

  • Revision 1: published by Iterate Array on