Run details:
Mozilla/5.0 (Linux; Android 10; ONEPLUS A5000) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Mobile Safari/537.36
Chrome Mobile 84
Android
Mobile
4 years ago
Test name Executions per second
parseInt a number 271683.9 Ops/sec
parseInt a string 245663.7 Ops/sec
toString a number 2052635.5 Ops/sec
toString a string 2500724.0 Ops/sec
unery convert to number from number 3950590.5 Ops/sec
unery convert to number from string 1462568.6 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


;