Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
test regex vs match vs includes
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/122.0.0.0 Safari/537.36
Browser:
Chrome 122
Operating system:
Windows
Device Platform:
Desktop
Date tested:
2 years ago
includes
10.4M/s
regex
7.8M/s
match
2.6M/s
View exact numbers
Test name
Executions per second
✓
includes
10,447,221 Ops/sec
regex
7,809,878 Ops/sec
match
2,638,409 Ops/sec
Script Preparation code:
var num = "1.899999999996"
Tests:
regex
/^\d+\.\d{3,}$/.test(num)
includes
num.includes('.')
match
num.match('.')