Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:121.0) Gecko/20100101 Firefox/121.0
Firefox 121
Mac OS X 10.15
Desktop
11 months ago
Test name Executions per second
trunc 735354688.0 Ops/sec
round 733336192.0 Ops/sec
floor 733820800.0 Ops/sec
parseFloat to int 9117106.0 Ops/sec
~~ 736113344.0 Ops/sec
0 | 733890624.0 Ops/sec
parseInt 733546688.0 Ops/sec
parseInt, 10 735431360.0 Ops/sec
Tests:
  • trunc

  • round

  • floor

  • parseFloat to int

  • ~~

  • 0 |

  • parseInt

  • parseInt, 10