Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.2.1 Safari/605.1.15
Safari 17
Mac OS X 10.15.7
Desktop
10 months ago
Test name Executions per second
fillRect/concat 152.4 Ops/sec
fillRect/join 146.1 Ops/sec
1×1 Image Data 119.3 Ops/sec
fillRect/template literal 90.0 Ops/sec
getImageData/putImageData 222.1 Ops/sec
getImageData/putImageData - set px.rgba 216.1 Ops/sec
getImageData/putImageData - set [px.r, px.g, px.b, px.a] 262.8 Ops/sec
getImageData/putImageData - set - no getImageData 272.9 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