Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/119.0
Firefox 119
Mac OS X 10.15
Desktop
one year ago
Test name Executions per second
parseInt a number 104296312.0 Ops/sec
parseInt a string 3914141.2 Ops/sec
toString a number 4576091.5 Ops/sec
toString a string 26157232.0 Ops/sec
unery convert to number from number 29275494.0 Ops/sec
unery convert to number from string 8588778.0 Ops/sec
Script Preparation code:
Tests:
  • parseInt a number

  • parseInt a string

  • toString a number

  • toString a string

  • unery convert to number from number

  • unery convert to number from string