Run details:
Mozilla/5.0 (iPad; CPU OS 15_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/70.0.3538.75 Mobile/15E148 Safari/605.1
Chrome Mobile iOS 70
iOS 15.6
Tablet
2 years ago
Test name Executions per second
fillRect/concat 135.8 Ops/sec
fillRect/join 120.8 Ops/sec
1×1 Image Data 23.1 Ops/sec
fillRect/template literal 88.5 Ops/sec
getImageData/putImageData 396.8 Ops/sec
getImageData/putImageData - set px.rgba 348.3 Ops/sec
getImageData/putImageData - set [px.r, px.g, px.b, px.a] 340.7 Ops/sec
getImageData/putImageData - set - no getImageData 215.0 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • fillRect/concat

  • fillRect/join

  • 1×1 Image Data

  • fillRect/template literal

  • getImageData/putImageData

  • getImageData/putImageData - set px.rgba

  • getImageData/putImageData - set [px.r, px.g, px.b, px.a]

  • getImageData/putImageData - set - no getImageData