Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
Chrome 120
Mac OS X 10.15.7
Desktop
11 months ago
Test name Executions per second
trunc 9082383.0 Ops/sec
round 9111036.0 Ops/sec
floor 9172117.0 Ops/sec
parseFloat to int 3475482.8 Ops/sec
~~ 1042250944.0 Ops/sec
0 | 1041884032.0 Ops/sec
parseInt 8991021.0 Ops/sec
parseInt, 10 9093849.0 Ops/sec
Tests:
  • trunc

  • round

  • floor

  • parseFloat to int

  • ~~

  • 0 |

  • parseInt

  • parseInt, 10