Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.82 Safari/537.36
Chrome 99
Windows
Desktop
2 years ago
Test name Executions per second
Multiply using Decimal.js 560456.1 Ops/sec
Multiply using native numbers 11223205.0 Ops/sec
exactMath div 13934.9 Ops/sec
Decimal plus 640732.7 Ops/sec
exactMath add 166681.0 Ops/sec
Decimal times 578191.1 Ops/sec
exactMath mul 118870.7 Ops/sec
exactMath formula 4447.4 Ops/sec
Decimal times minus div 192266.4 Ops/sec
Decimal div 287386.0 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • Multiply using Decimal.js

  • Multiply using native numbers

  • exactMath div

  • Decimal plus

  • exactMath add

  • Decimal times

  • exactMath mul

  • exactMath formula

  • Decimal times minus div

  • Decimal div