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 735364032.0 Ops/sec
round 736371264.0 Ops/sec
floor 734286976.0 Ops/sec
parseFloat to int 9088259.0 Ops/sec
~~ 732813824.0 Ops/sec
0 | 732240320.0 Ops/sec
parseInt 734016064.0 Ops/sec
parseInt, 10 731870592.0 Ops/sec
Tests:
  • trunc

  • round

  • floor

  • parseFloat to int

  • ~~

  • 0 |

  • parseInt

  • parseInt, 10