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; rv:148.0) Gecko/20100101 Firefox/148.0
Browser:
Firefox 148
Operating system:
Windows
Device Platform:
Desktop
Date tested:
2 months ago
Test name
Executions per second
Split
37031792.0 Ops/sec
Substring
43452724.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))