Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
RegEx.test vs. String.includes vs. String.match (with multiple strings)
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Browser:
Chrome 131
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
RegEx.test
39401532.0 Ops/sec
Iteration and String.includes
6887145.5 Ops/sec
String.match
25289940.0 Ops/sec
Script Preparation code:
const string = 'Outstanding'; const regex = /toda|bfi|coms|cot|cos|ipe|ips|rn|rm|ap|sf|st|sp|ss|sv|to|t|o|e|s/; const searchStrings = ['toda', 'bfi', 'coms', 'cot', 'cos', 'ipe', 'ips', 'rn', 'rm', 'ap', 'sf', 'st', 'sp', 'ss', 'sv', 'to', 't', 'o', 'e', 's'];
Tests:
RegEx.test
/toda|bfi|coms|cot|cos|ipe|ips|rn|rm|ap|sf|st|sp|ss|sv|to|t|o|e|s/.test('Outstanding');
Iteration and String.includes
['toda', 'bfi', 'coms', 'cot', 'cos', 'ipe', 'ips', 'rn', 'rm', 'ap', 'sf', 'st', 'sp', 'ss', 'sv', 'to', 't', 'o', 'e', 's'].some(s => 'Outstanding'.includes(s));
String.match
'Outstanding'.match(/toda|bfi|coms|cot|cos|ipe|ips|rn|rm|ap|sf|st|sp|ss|sv|to|t|o|e|s/);