Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
JavaScript search() vs indexOf()
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:132.0) Gecko/20100101 Firefox/132.0
Browser:
Firefox 132
Operating system:
Ubuntu
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
search()
16666706.0 Ops/sec
indexOf()
1255743744.0 Ops/sec
Tests:
search()
const str = 'This is a test'; str.search('test');
indexOf()
const str = 'This is a test'; str.indexOf('test');