Script Preparation code:
AخA
 
string = "This benchmark is testing if split or match is faster on a string using regex";
regex = /\S+/gi;
Tests:
  • split

     
    string.split(regex)
  • match

     
    string.match(regex)
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    split
    match

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 5 months ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0
Firefox 132 on Windows
View result in a separate tab
Test name Executions per second
split 3090446.2 Ops/sec
match 3002655.5 Ops/sec