Native vs Native + toFixed vs decimal.js vs big.js vs bignumber.jsFastest: Native (211.1x faster)
130,991,520 ops/sec
19,728,636 ops/sec
1,301,828 ops/sec
1,182,022 ops/sec
620,579 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| Native | |
| Native + toFixed | |
| decimal.js | |
| big.js | |
| bignumber.js |
| Test name | Executions per second |
|---|---|
| ✓ Native | 149,504,768 Ops/sec |
| Native + toFixed | 21,328,400 Ops/sec |
| decimal.js | 1,295,041 Ops/sec |
| bignumber.js | 1,121,315 Ops/sec |
| big.js | 662,910 Ops/sec |