Script Preparation code:
AخA
 
var value = 'Some random string';
Tests:
  • String cast

     
    String(value).length === 0
  • String concat

     
    ('' + value).length === 0
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    String cast
    String concat

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 8 years ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.59 Safari/537.36
Chrome 54 on Mac OS X 10.11.4
View result in a separate tab
Test name Executions per second
String cast 3468437.5 Ops/sec
String concat 10195876.0 Ops/sec