Script Preparation code:
AخA
 
var string = 'salut comment ca  va moi test pa adsk ldsj dkjasb kdaj akdajkda     dkna dlkas mas '
Tests:
  • Split by regex

     
    var res = string.split(/\btest\b/)
  • Split by string

     
    var res = string.split('test')
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Split by regex
    Split by string

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one month ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36
Chrome 134 on Windows
View result in a separate tab
Test name Executions per second
Split by regex 21049892.0 Ops/sec
Split by string 57239808.0 Ops/sec