Run details:
Mozilla/5.0 (iPhone; CPU iPhone OS 14_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.1 Mobile/15E148 Safari/604.1
Mobile Safari 14
iOS 14.6
Mobile
3 years ago
Test name Executions per second
fillRect/concat 115.2 Ops/sec
fillRect/join 106.7 Ops/sec
1×1 Image Data 38.3 Ops/sec
fillRect/template literal 105.3 Ops/sec
getImageData/putImageData 463.6 Ops/sec
getImageData/putImageData - set px.rgba 386.6 Ops/sec
getImageData/putImageData - set [px.r, px.g, px.b, px.a] 123.7 Ops/sec
getImageData/putImageData - set - no getImageData 34.1 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