Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36
Chrome 124
Windows
Desktop
2 years ago
bignumber.js toFixed(18)
296K/s
bignumber.js toString()
294K/s
big.js toFixed(18)
257K/s
decimal.js toFixed(18)
233K/s
decimal.js toString()
224K/s
View exact numbers
| Test name |
Executions per second |
|
✓
Native toFixed(9)
|
3,537,945 Ops/sec |
|
Native toString()
|
3,522,886 Ops/sec |
|
bignumber.js toFixed(18)
|
295,740 Ops/sec |
|
bignumber.js toString()
|
294,022 Ops/sec |
|
big.js toString()
|
288,025 Ops/sec |
|
big.js toFixed(18)
|
257,287 Ops/sec |
|
decimal.js toFixed(18)
|
232,782 Ops/sec |
|
decimal.js toString()
|
224,030 Ops/sec |
Tests:
-
Native toString()
-
Native toFixed(9)
-
bignumber.js toString()
-
bignumber.js toFixed(18)
-
big.js toString()
-
big.js toFixed(18)
-
decimal.js toString()
-
decimal.js toFixed(18)