Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Testing New
(version: 0)
Comparing performance of:
Regex vs Non Regex
Created:
2 years ago
by:
Guest
Jump to the latest result
Script Preparation code:
var name = "Ryu Suke Kubo";
Tests:
Regex
var testing = name.match(/(\b\S)?/g).join("").match(/(^\S|\S$)?/g).join("").toUpperCase();
Non Regex
var testing2 = ""; var splited = name.split(" "); if(splited.length) { testing2 = splited[0].charAt(0); if(splited.length > 1) { testing2 = `${testing2}${splited[splited.length - 1].charAt(0)}` } }
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Regex
Non Regex
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!
Related benchmarks:
jhgjhgjhgjhg
Lodash.get vs Property dot notation with sanity check
asdasdjkh askjdjkasdkjasd
Lodash.get vs Property dot notation vs Own get coded manually
Lodash.get vs Property dot notation with ?
Comments
Confirm delete:
Do you really want to delete benchmark?