Test name | Executions per second |
---|---|
parseInt | 10384760.0 Ops/sec |
Math.floor | 10080236.0 Ops/sec |
parseInt - fixed | 19107810.0 Ops/sec |
Math.floor - fixed | 18730416.0 Ops/sec |
parseInt(Math.random() * 100, 10)
Math.floor(Math.random() * 100)
parseInt(123456789, 10)
Math.floor(123456789)