Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Testing split vs lastindexOf
Testing split vs lastindexOf
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36
Browser:
Chrome 137
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
9 months ago
Test name
Executions per second
split and pop
43511344.0 Ops/sec
lastindexof
74955224.0 Ops/sec
Script Preparation code:
var s1 = "ALX:PLY:THE:Piano";
Tests:
split and pop
var n1 = s1.split(":").pop();
lastindexof
var n1 = s1.substring(s1.lastIndexOf(":") + 1);