Run details:
CueServer Studio/5.0.0b3
Other
Other
Desktop
2 years ago
Test name Executions per second
floor 1991177.2 Ops/sec
~~ 3338279.0 Ops/sec
>> 0 3382289.0 Ops/sec
| 0 3375037.0 Ops/sec
<< 0 3420807.5 Ops/sec
& 0xFFFFFFFFFFFF 3404647.5 Ops/sec
^ 0x000000000000 3418522.5 Ops/sec
Math.trunc() 1981778.8 Ops/sec
x - (x % 1) 2186199.0 Ops/sec
parseInt() 1791682.4 Ops/sec
Script Preparation code:
Tests:
  • floor

  • ~~

  • >> 0

  • | 0

  • << 0

  • & 0xFFFFFFFFFFFF

  • ^ 0x000000000000

  • Math.trunc()

  • x - (x % 1)

  • parseInt()