Script Preparation code:
AخA
 
var str = "  abc";
Tests:
  • trim + length

     
    str.trim().length > 2
  • regex test

     
    /\S{3,}/.test(str)
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    trim + length
    regex test

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 3 years ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Firefox/91.0
Firefox 91 on Mac OS X 10.15
View result in a separate tab
Test name Executions per second
trim + length 24713008.0 Ops/sec
regex test 18774688.0 Ops/sec