HTML Preparation code:
AخA
 
1
<script src='https://cdn.jsdelivr.net/npm/decimal.js-light@2.5.0/decimal.min.js'></script>
2
<script src='https://cdn.jsdelivr.net/npm/exact-math@2.2.3/dist/exact-math.js'></script>
Script Preparation code:
 
var x = 5.236;
Tests:
  • Multiply using Decimal.js

     
    Decimal('0.00253452345').times(x)
  • Multiply using native numbers

     
    0.00253452345 * x
  • exactMath

     
    exactMath.div('0.00253452345', x);
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Multiply using Decimal.js
    Multiply using native numbers
    exactMath

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one month ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 Edg/130.0.0.0
Chrome 130 on Mac OS X 10.15.7
View result in a separate tab
Test name Executions per second
Multiply using Decimal.js 916702.6 Ops/sec
Multiply using native numbers 9269336.0 Ops/sec
exactMath 37309.5 Ops/sec