Test case name | Result |
---|---|
floor | |
~~ | |
>> 0 | |
| 0 | |
<< 0 | |
& 0xFFFFFFFFFFFF | |
^ 0x000000000000 | |
Math.trunc() | |
x - (x % 1) | |
parseInt() |
Test name | Executions per second |
---|---|
floor | 12861633.0 Ops/sec |
~~ | 13080450.0 Ops/sec |
>> 0 | 13098640.0 Ops/sec |
| 0 | 13050030.0 Ops/sec |
<< 0 | 13111414.0 Ops/sec |
& 0xFFFFFFFFFFFF | 13161967.0 Ops/sec |
^ 0x000000000000 | 13153138.0 Ops/sec |
Math.trunc() | 12724145.0 Ops/sec |
x - (x % 1) | 8114593.0 Ops/sec |
parseInt() | 12779675.0 Ops/sec |