Run details:
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
Android
Mobile
one year ago
Benchmark.js
fillRect with a constant color string
2K/s
fillRect with a template literal color string
639/s
fillRect using a concatenated color string
626/s
fillRect using a joined color string
590/s
Using drawImage to copy a pixel from a palette canvas
356/s
putImageData() using a 1px by 1px ImageData instance
16/s
View exact numbers
| Test name |
Executions per second |
|
✓
fillRect with a constant color string
|
2,385 Ops/sec |
|
fillRect with a template literal color string
|
639 Ops/sec |
|
fillRect using a concatenated color string
|
626 Ops/sec |
|
fillRect using a joined color string
|
590 Ops/sec |
|
Using drawImage to copy a pixel from a palette canvas
|
356 Ops/sec |
|
putImageData() using a 1px by 1px ImageData instance
|
16 Ops/sec |
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