Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
testing string
(version: 1)
Comparing performance of:
test vs match vs startsWith vs s
Created:
one year ago
by:
Guest
Jump to the latest result
Script Preparation code:
const string = "Hello world"; const regExp = /^Hello/;
Tests:
test
regExp.test(string)
match
string.match(regExp)
startsWith
string.startsWith('Hello');
s
console.log('')
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (4)
Previous results
Fork
Test case name
Result
test
match
startsWith
s
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
one year ago
)
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 YaBrowser/25.2.0.0 Safari/537.36
Browser/OS:
Yandex Browser 25 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
test
43720644.0 Ops/sec
match
25005682.0 Ops/sec
startsWith
67088988.0 Ops/sec
s
433286.9 Ops/sec
Comments
Confirm delete:
Do you really want to delete benchmark?