Run details:
Mozilla/5.0 (Android 13; Mobile; rv:109.0) Gecko/115.0 Firefox/115.0
Firefox Mobile 115
Android
Mobile
one year ago
Test name Executions per second
parseInt a number 29314270.0 Ops/sec
parseInt a string 1923887.0 Ops/sec
toString a number 810107.6 Ops/sec
toString a string 6470057.0 Ops/sec
string literal a number 2218438.0 Ops/sec
string literal a string 15059860.0 Ops/sec
add empty string to number 1627061.0 Ops/sec
add empty string to string 27669070.0 Ops/sec
Script Preparation code:
Tests:
  • parseInt a number

  • parseInt a string

  • toString a number

  • toString a string

  • string literal a number

  • string literal a string

  • add empty string to number

  • add empty string to string