Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:52.0) Gecko/20100101 Firefox/52.0
Firefox 52
Windows
Other
8 years ago
Test name Executions per second
floor 93395240.0 Ops/sec
~~ 139476880.0 Ops/sec
>> 0 139539440.0 Ops/sec
| 0 140038064.0 Ops/sec
<< 0 140647344.0 Ops/sec
& 0xFFFFFFFFFFFF 136545568.0 Ops/sec
^ 0x000000000000 139595968.0 Ops/sec
Math.trunc() 27469622.0 Ops/sec
x - (x % 1) 22026382.0 Ops/sec
parseInt() 30878052.0 Ops/sec
Script Preparation code:
Tests:
  • floor

  • ~~

  • >> 0

  • | 0

  • << 0

  • & 0xFFFFFFFFFFFF

  • ^ 0x000000000000

  • Math.trunc()

  • x - (x % 1)

  • parseInt()