str.match vs str.Split

Test String.match with regex against String.split with string. We are splitting a string at the spaces.
3 months ago
User agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36
Test name Executions per second
String.split 4378047.0 Ops/sec
Regex.match 839289.1 Ops/sec
Script Preparation code:
Tests:
  • String.split

  • Regex.match

Open this result on MeasureThat.net