jsPerf.app is an online JavaScript performance benchmark test runner & jsperf.com mirror. It is a complete rewrite in homage to the once excellent jsperf.com now with hopefully a more modern & maintainable codebase.
jsperf.com URLs are mirrored at the same path, e.g:
https://jsperf.com/negative-modulo/2
Can be accessed at:
https://jsperf.app/negative-modulo/2
const rgbToHex1 = (r, g, b) =>
(0x1000000 + (r << 16) + (g << 8) + b).toString(16).slice(1)
const rgbToHex2 = (r, g, b) =>
((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1)
const rgbToHex3 = (r, g, b) =>
((r << 16) + (g << 8) + b).toString(16).padStart(6, "0")
Ready to run.
Test | Ops/sec | |
---|---|---|
rgbToHex1 |
| ready |
rgbToHex2 |
| ready |
rgbToHex3 |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.