Run details:
Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/117.0
Firefox 117
Linux
Desktop
one year ago
Test name Executions per second
Multiply using Decimal.js 1681.8 Ops/sec
Multiply using native numbers 2188208.5 Ops/sec
Multiply using numerical strings parsed with Number 3660234.2 Ops/sec
Multiply using numerical strings parsed with parseFloat 15121.6 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • Multiply using Decimal.js

  • Multiply using native numbers

  • Multiply using numerical strings parsed with Number

  • Multiply using numerical strings parsed with parseFloat