toFixed(4) someFloat.toFixed(4); someFloat.t vs (Math.round(*10000)/10000).toString()| Test case name | Result |
|---|---|
| toFixed(4) someFloat.toFixed(4); someFloat.t | |
| (Math.round(*10000)/10000).toString() |
| Test name | Executions per second |
|---|---|
| ✓ (Math.round(*10000)/10000).toString() | 6,178,558 Ops/sec |
| toFixed(4) someFloat.toFixed(4); someFloat.t | 3,563,536 Ops/sec |