HTML Preparation code:
Script Preparation code:
Tests:
  • fillRect using a concatenated color string

  • fillRect using a joined color string

  • fillRect with a template literal color string

  • fillRect with a constant color string

  • putImageData() using a 1px by 1px ImageData instance

  • Using drawImage to copy a pixel from a palette canvas

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    fillRect using a concatenated color string
    fillRect using a joined color string
    fillRect with a template literal color string
    fillRect with a constant color string
    putImageData() using a 1px by 1px ImageData instance
    Using drawImage to copy a pixel from a palette canvas

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Mobile Safari/537.36
Chrome Mobile 126 on Android
View result in a separate tab
Test name Executions per second
fillRect using a concatenated color string 625.9 Ops/sec
fillRect using a joined color string 590.0 Ops/sec
fillRect with a template literal color string 639.3 Ops/sec
fillRect with a constant color string 2385.0 Ops/sec
putImageData() using a 1px by 1px ImageData instance 16.1 Ops/sec
Using drawImage to copy a pixel from a palette canvas 355.9 Ops/sec