Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
decimal.js vs. native reduce
- https://github.com/MikeMcl/decimal.js/tree/v10.3.1
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36
Browser:
Chrome 135
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
Native
60574112.0 Ops/sec
decimal.js
117744.4 Ops/sec
HTML Preparation code:
<script src="https://cdnjs.cloudflare.com/ajax/libs/decimal.js/10.3.1/decimal.min.js"></script>
Tests:
Native
[1, 2, 3, 4, .2, .1, .5, .1, .0981212, 1, 2, 3, 4, .2, .1, .5, .1, .0981212, 1, 2, 3, 4, .2, .1, .5, .1, .0981212, 1, 2, 3, 4, .2, .1, .5, .1, .0981212].reduce((a, b) => a + b, 0)
decimal.js
[1, 2, 3, 4, .2, .1, .5, .1, .0981212, 1, 2, 3, 4, .2, .1, .5, .1, .0981212, 1, 2, 3, 4, .2, .1, .5, .1, .0981212, 1, 2, 3, 4, .2, .1, .5, .1, .0981212].reduce( (a, b) => a.plus(b), new Decimal(0) ).toNumber()