Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
includes vs regex
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/113.0
Browser:
Firefox 113
Operating system:
Ubuntu
Device Platform:
Desktop
Date tested:
2 years ago
Test name
Executions per second
includes
20137266.0 Ops/sec
regex
10593101.0 Ops/sec
Script Preparation code:
var str = `Find out how to improve the speed of your web application! Create a benchmark, measure performance " of the JavaScript code and pick the fastest version. Click New benchmark to get started. Or checkout existing benchmarks that were added by the Community.`
Tests:
includes
str.includes('"') str.includes('@')
regex
/"/.test(str); /@/.test(str)