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 29147318.0 Ops/sec
parseInt a string 1925572.4 Ops/sec
toString a number 2108766.2 Ops/sec
toString a string 6349736.0 Ops/sec
string literal a number 2202828.0 Ops/sec
string literal a string 14991801.0 Ops/sec
add empty string to number 1243582.0 Ops/sec
add empty string to string 27606428.0 Ops/sec
String constructor on a number 6922161.0 Ops/sec
String constructor on a string 4122140.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

  • String constructor on a number

  • String constructor on a string


;