Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Split vs Substr+IndexOf Performance
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36 Edg/136.0.0.0
Browser:
Chrome 136
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
Split
49966880.0 Ops/sec
Substring
87431976.0 Ops/sec
Script Preparation code:
var s1 = "28.9% CPU samples were in `Array.Sort` called from `DiagService.Controllers.PerfCPUController.CpuTask`. We expect this value to be less than 0.7%."
Tests:
Split
var resultSplit = s1.split[1];
Substring
var resultSubstr = s1.substring(s1.indexOf('`') + 1, s1.indexOf('`', s1.indexOf('`') + 1))