Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36
Chrome 137
Linux
Desktop
11 months ago
Test name Executions per second
Math.round(n) 112449472.0 Ops/sec
Bitwise n + (n < 0 ? -0.5 : 0.5)>>0 113311424.0 Ops/sec
Script Preparation code:
Tests:
  • Math.round(n)

  • Bitwise n + (n < 0 ? -0.5 : 0.5)>>0