Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Regexp test VS array.every and includes
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (iPhone; CPU iPhone OS 27_0_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/150.0.7871.113 Mobile/15E148 Safari/604.1
Browser:
Chrome Mobile iOS 150
Operating system:
iOS 27.0.0
Device Platform:
Mobile
Date tested:
20 days ago
Regex.test
14.4M/s
Includes
9.5M/s
View exact numbers
Test name
Executions per second
✓
Regex.test
14,428,793 Ops/sec
Includes
9,477,003 Ops/sec
Script Preparation code:
const keywords = ['some', 'strings']; const regex = new RegExp(keywords.join("|"), "i"); const string = "Some guitars don't have a lot of strings on them.";
Tests:
Includes
const keywords = ['some', 'strings']; const string = "Some guitars don't have a lot of strings on them."; keywords.every(str => string.toLowerCase().includes(str.toLowerCase()));
Regex.test
const keywords = ['some', 'strings']; const regex = new RegExp(keywords.join("|"), "i"); const string = "Some guitars don't have a lot of strings on them."; regex.test(string);