Run details:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Mobile Safari/537.36 OPR/88.0.0.0
Opera Mobile 88
Android
Mobile
one year ago
Bitwise n + (n < 0 ? -0.5 : 0.5)>>0
82.9M/s
Math.round(n)
79.6M/s
View exact numbers
Test name Executions per second
Bitwise n + (n < 0 ? -0.5 : 0.5)>>0 82,881,000 Ops/sec
Math.round(n) 79,567,920 Ops/sec
Script Preparation code:
Tests: