Run details:
Mozilla/5.0 (X11; CrOS x86_64 14816.64.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36
Chrome 103
Chrome OS 14816.64.0
Desktop
8 months ago
Test name Executions per second
floor 675786.8 Ops/sec
~~ 1434331.1 Ops/sec
>> 0 1425225.9 Ops/sec
| 0 1426244.4 Ops/sec
<< 0 1443752.8 Ops/sec
& 0xFFFFFFFFFFFF 1426258.8 Ops/sec
^ 0x000000000000 1452330.4 Ops/sec
Math.trunc() 665534.8 Ops/sec
x - (x % 1) 970934.4 Ops/sec
parseInt() 667605.3 Ops/sec
Script Preparation code:
Tests:
  • floor

  • ~~

  • >> 0

  • | 0

  • << 0

  • & 0xFFFFFFFFFFFF

  • ^ 0x000000000000

  • Math.trunc()

  • x - (x % 1)

  • parseInt()


;