Trunc vs Floor vs ParseInt vs Bitwise invert2Fastest: Bitwise invert2 (1.5x faster)
48,685,432 ops/sec
36,312,848 ops/sec
34,255,964 ops/sec
31,540,396 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| Trunc | |
| Floor | |
| ParseInt | |
| Bitwise invert2 |
| Test name | Executions per second |
|---|---|
| ✓ Bitwise invert2 | 132,347,064 Ops/sec |
| Trunc | 122,237,208 Ops/sec |
| Floor | 116,850,576 Ops/sec |
| ParseInt | 95,307,352 Ops/sec |