Test case name | Result |
---|---|
Round floating number using lodash round function | |
Round floating number using toFixed() | |
Round floating number using toFixed() and parseFloat |
Test name | Executions per second |
---|---|
Round floating number using lodash round function | 2183.1 Ops/sec |
Round floating number using toFixed() | 8882.6 Ops/sec |
Round floating number using toFixed() and parseFloat | 5848.4 Ops/sec |