Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36
Chrome 98
Windows
Desktop
2 years ago
Test name Executions per second
Clear only 283318.2 Ops/sec
Save transform Clear restore 221616.4 Ops/sec
Canvas w with memo 2159.5 Ops/sec
w=w 195661.1 Ops/sec
w+=0 201036.8 Ops/sec
fillRect 211661.0 Ops/sec
createImageData 485.0 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • Clear only

  • Save transform Clear restore

  • Canvas w with memo

  • w=w

  • w+=0

  • fillRect

  • createImageData