HTML Preparation code:
AخA
 
1
<canvas id="canvas" width="1400" height="1400"></canvas>
Script Preparation code:
x
 
var canvas = document.getElementById('canvas');
var ctx = canvas.getContext("2d");
var cacheG = document.createElement('canvas');
var cacheD = cacheG.getContext('2d');
cacheG.width = 1200;
cacheG.height = 1200;
cacheD.beginPath();
cacheD.fillStyle = '#000';
cacheD.arc(600, 600, 600, 0, Math.PI * 2, true);
cacheD.fill();
var d = cacheD.getImageData(0,0,1200,1200)
Tests:
  • drawImage

     
    ctx.drawImage(cacheG, 6, 6);
  • putImageData

     
    ctx.putImageData(d, 6, 6);
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    drawImage
    putImageData

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 4 years ago)
Mozilla/5.0 (iPad; CPU OS 14_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/86.0.4240.93 Mobile/15E148 Safari/604.1
Chrome Mobile iOS 86 on iOS 14.2
View result in a separate tab
Test name Executions per second
drawImage 28152.2 Ops/sec
putImageData 1454.1 Ops/sec