Canvas getImageData (v8)

Revision 8 of this benchmark created on


Preparation HTML

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">
</script>

Setup

var canvas = document.createElement("canvas")
    canvas.width = 2048
    canvas.height = 2048
    var ctx = canvas.getContext("2d")
    ctx.fillRect(0, 0, 2048, 10)

Test runner

Ready to run.

Testing in
TestOps/sec
one tile
data = ctx.getImageData(0, 0, 2048, 2048)
ready
multiple tiles
var data = []
for (var x = 0; x < 64; x++) {
  data.push(canvas.getContext("2d").getImageData(x * 8, (x % 8) * 8, 256, 256));
}
ready

Revisions

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