Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Chrome 131
Linux
Desktop
11 hours ago
Test name Executions per second
floor 3015936.8 Ops/sec
~~ 4253275.0 Ops/sec
>> 0 4256468.0 Ops/sec
| 0 4210163.0 Ops/sec
<< 0 4110666.0 Ops/sec
& 0xFFFFFFFFFFFF 3938472.8 Ops/sec
^ 0x000000000000 3761751.2 Ops/sec
Math.trunc() 2659086.5 Ops/sec
x - (x % 1) 2587190.2 Ops/sec
parseInt() 2664189.2 Ops/sec
Script Preparation code:
Tests:
  • floor

  • ~~

  • >> 0

  • | 0

  • << 0

  • & 0xFFFFFFFFFFFF

  • ^ 0x000000000000

  • Math.trunc()

  • x - (x % 1)

  • parseInt()


;