Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36
Chrome 127
Mac OS X 10.15.7
Desktop
3 months ago
Test name Executions per second
floor 7029204.0 Ops/sec
~~ 12715541.0 Ops/sec
>> 0 12739306.0 Ops/sec
| 0 12682690.0 Ops/sec
<< 0 12725450.0 Ops/sec
& 0xFFFFFFFFFFFF 12621707.0 Ops/sec
^ 0x000000000000 12736425.0 Ops/sec
Math.trunc() 7037770.0 Ops/sec
x - (x % 1) 6595497.0 Ops/sec
parseInt() 7099832.0 Ops/sec
Script Preparation code:
Tests:
  • floor

  • ~~

  • >> 0

  • | 0

  • << 0

  • & 0xFFFFFFFFFFFF

  • ^ 0x000000000000

  • Math.trunc()

  • x - (x % 1)

  • parseInt()


;