0
Performance test stuff
Iâm curious what the fastest way to find if a string includes another string is. there are some sources online but they all have different answers So which one of these (or others I havenât included) would be the best performance? Var g = âhello worldâ; solution 1: g.includes(âzâ) solution 2: g.indexOf(âzâ) != -1 solution 3: /z/.test(g)
2 Answers
+ 1
for premformence, Regex (3) is the fastes
it is the most used for large data tests