Run details:
Mozilla/5.0 (X11; Linux x86_64; rv:126.0) Gecko/20100101 Firefox/126.0
Firefox 126
Linux
Desktop
2 years ago
No cropping or scaling on main thread, assume ImageBitmap will be transferred to worker (note: not actually transferred in this benchmark)
650K/s
Crop and Resize using createImageBitmap, currently bugged in FF 111.0
555K/s
Crop and Resize using Canvas scaling, usually somewhat slow
542K/s
View exact numbers
Test name Executions per second
No cropping or scaling on main thread, assume ImageBitmap will be transferred to worker (note: not actually transferred in this benchmark) 649,599 Ops/sec
Crop and Resize using createImageBitmap, currently bugged in FF 111.0 554,921 Ops/sec
Crop and Resize using Canvas scaling, usually somewhat slow 542,343 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests: