Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36
Chrome 96
Windows
Desktop
3 years ago
Test name Executions per second
draw squares 1176.1 Ops/sec
draw circles 727.2 Ops/sec
drawImage squares 223.3 Ops/sec
drawImage circles 264.0 Ops/sec
putImageData squares 113.7 Ops/sec
putImageData circles 112.1 Ops/sec
Script Preparation code:
Tests:
  • draw squares

  • draw circles

  • drawImage squares

  • drawImage circles

  • putImageData squares

  • putImageData circles