Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
test vs match vs startsWith vs [0] vs includes vs search
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36
Browser:
Chrome 124
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
test
41749320.0 Ops/sec
match
30162902.0 Ops/sec
startsWith
167858768.0 Ops/sec
array 0
167836208.0 Ops/sec
includes
172428640.0 Ops/sec
search
35467656.0 Ops/sec
Tests:
test
/@.*/.test("@MyVariable")
match
"@MyVariable".match(/@.*/)
startsWith
"@MyVariable".startsWith("@")
array 0
"@MyVariable"[0] === "@"
includes
"@MyVariable".includes("@")
search
"@MyVariable".search(/@.*/)