Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36
Chrome 119
Linux
Desktop
2 years ago
Math.max.apply
1.3M/s
Math.max with spread
298K/s
for loop length caching
15K/s
basic for loop
10K/s
View exact numbers
Test name Executions per second
Math.max.apply 1,347,351 Ops/sec
Math.max with spread 297,788 Ops/sec
for loop length caching 14,985 Ops/sec
basic for loop 10,220 Ops/sec
Script Preparation code:
Tests: