Run details:
Mozilla/5.0 (Linux; Android 9; SAMSUNG SM-G950F) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/14.0 Chrome/87.0.4280.141 Mobile Safari/537.36
Chrome Mobile 87
Android
Mobile
3 years ago
Test name Executions per second
fillRect/concat 20.8 Ops/sec
fillRect/join 18.8 Ops/sec
1×1 Image Data 12.5 Ops/sec
fillRect/template literal 14.6 Ops/sec
getImageData/putImageData 46.6 Ops/sec
getImageData/putImageData - set px.rgba 43.4 Ops/sec
getImageData/putImageData - set [px.r, px.g, px.b, px.a] 42.9 Ops/sec
getImageData/putImageData - set - no getImageData 86.7 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