Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
RegEx.test vs String.search
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:138.0) Gecko/20100101 Firefox/138.0
Browser:
Firefox 138
Operating system:
Mac OS X 10.15
Device Platform:
Desktop
Date tested:
11 months ago
Test name
Executions per second
RegEx.test()
63780216.0 Ops/sec
String.search()
44939516.0 Ops/sec
Script Preparation code:
var REGEX = /abcdef/
Tests:
RegEx.test()
REGEX.test('This is a sample text that should work.')
String.search()
'This is a sample text that should work.'.search(REGEX)