Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
slice lastIndexOf vs char position
(version: 1)
Comparing performance of:
substring vs indexof
Created:
one year ago
by:
Guest
Jump to the latest result
Script Preparation code:
var example = 'there/is-no-spoon'
Tests:
substring
var result = example.slice(example.lastIndexOf('/') + 1)
indexof
var result = example.slice(10)
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
substring
indexof
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Comments
Confirm delete:
Do you really want to delete benchmark?