Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.1 Safari/605.1.15
Safari 18
Mac OS X 10.15.7
Desktop
one year ago
No cropping or scaling on main thread, assume ImageBitmap will be transferred to worker (note: not actually transferred in this benchmark)
6.1M/s
Crop and Resize using createImageBitmap, currently bugged in FF 111.0
5.8M/s
Crop and Resize using Canvas scaling, usually somewhat slow
2.6M/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) 6,123,214 Ops/sec
Crop and Resize using createImageBitmap, currently bugged in FF 111.0 5,782,219 Ops/sec
Crop and Resize using Canvas scaling, usually somewhat slow 2,614,264 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests: