Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
regex vs string comparison test
(version: 0)
Comparing performance of:
regex vs string comparison
Created:
2 years ago
by:
Guest
Jump to the latest result
Tests:
regex
let propName = 'onClick' /^on[A-Z]/.test(propName)
string comparison
let propName = 'onClick' propName.startsWith('on') && propName.length > 2 && propName[2] === propName[2].toUpperCase()
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
regex
string comparison
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Comments
Confirm delete:
Do you really want to delete benchmark?