getImageData speed test

Benchmark created on


Preparation HTML

<canvas id="canvas"></canvas>
<script>
  var canvas = document.getElementById('canvas'),
      ctx = canvas.getContext('2d');
  var width = canvas.width,
      height = canvas.height;
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
test
for (var x = 0; x < width; x++)
for (var y = 0; y < height; y++)
ctx.getImageData(x, y, 1, 1);
ready
test
for (var x = 0; x < width; x++)
for (var y = 0; y < height; y++)
ctx.getImageData(x, y, 1, 1);
ready

Revisions

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