Math.sqrt vs sqrt with Math.powFastest: sqrt with Math.pow (2.7x faster)
372,513 ops/sec
139,005 ops/sec
16,611 ops/sec
16,466 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| Math.sqrt | |
| sqrt with Math.pow |
| Test name | Executions per second |
|---|---|
| ✓ Math.sqrt | 22,274 Ops/sec |
| sqrt with Math.pow | 17,873 Ops/sec |