I want to make sure what is the fast in node to parse a url query value. For example,
1) regexp is advanced string operations. For every character encountered while parsing, it has to match with each token in the entire regexp string. The complexity is a non-linear function of the length of source and the length of the regexp string.
2) whereas string tokenizer (split) on single char, the task is clearly cut out, as you sequentially traverse the source string, 'cut' and tokenize the word when encountered the pattern char, and move forward. The complexity is as good as order of n, where n is the number of chars in the string.
3) is actually a variant of (2), but with more chars in the splitter. So in case if the first char matches, there is additional work involved to match the subsequent chars etc. So the complexity increases, and move towards regexp. The performance is still better than regexp, as the regexp require further interpretation of its own tokens.
Hope this helps.