Script Preparation code:
AخA
 
var testString = "hello word"
Tests:
  • Splitting

     
    var split = testString.split(' ')[0];
  • Regex

     
    var regex = testString.match(/^[\w\-]+/)[0]
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Splitting
    Regex

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:126.0) Gecko/20100101 Firefox/126.0
Firefox 126 on Windows
View result in a separate tab
Test name Executions per second
Splitting 10039371.0 Ops/sec
Regex 15134401.0 Ops/sec