Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36
Chrome 95
Mac OS X 10.15.7
Desktop
3 years ago
Test name Executions per second
toString() 6089613.0 Ops/sec
toString() on strings 7668284.5 Ops/sec
String literals 12524436.0 Ops/sec
String literals on strings 9039879.0 Ops/sec
String() 714850.6 Ops/sec
String() on strings 715039.4 Ops/sec
Script Preparation code:
Tests:
  • toString()

  • toString() on strings

  • String literals

  • String literals on strings

  • String()

  • String() on strings


;