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: 6 months ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36
Chrome 126 on Mac OS X 10.15.7
View result in a separate tab
Test name Executions per second
fillRect using a concatenated color string 894.9 Ops/sec
fillRect using a joined color string 867.2 Ops/sec
fillRect with a template literal color string 851.1 Ops/sec
fillRect with a constant color string 1874.9 Ops/sec
putImageData() using a 1px by 1px ImageData instance 30.3 Ops/sec
Using drawImage to copy a pixel from a palette canvas 387.4 Ops/sec