Math.floor(test) vs Math.floor(test) + 1 vs ~~test vs ~~test + 1 vs Math.ceil(test)| Test case name | Result |
|---|---|
| Math.floor(test) | |
| Math.floor(test) + 1 | |
| ~~test | |
| ~~test + 1 | |
| Math.ceil(test) |
| Test name | Executions per second |
|---|---|
| ✓ ~~test + 1 | 1,666,089,600 Ops/sec |
| Math.ceil(test) | 1,664,137,088 Ops/sec |
| ~~test | 1,664,050,176 Ops/sec |
| Math.floor(test) + 1 | 1,662,753,664 Ops/sec |
| Math.floor(test) | 1,657,214,464 Ops/sec |