I was wondering about the speed of regex against the non-regex matching patterns. As I see there are 3 main cases.
1) wildcard at the begining of the match
2) wildcard in the middle
3) wildcard at the end
For each of these cases, is regex or non-regex faster. For example, doe non-regex short circuit if it finds a '*' at the end of the match?
I imagine that MC (internally) converts non-regexps to regexps (just as clicking "convert to regexp" does).
If that were the case, Regexps would be slightly faster (because conversion isn't required).
Flannel is right, they are all done internally the same way. I used to have a different matcher for the simpler (non-regexp) case, however my hand-written one turned out to be much slower. :)
He is also right, the conversion is done each time (perhaps room for improvement there?) however it should be quite fast. Basically it simply replaces each * by (.*?) and tosses ^ at the start and $ at the end. There is a bit more to it to detect things like "." inside the expression.
So, at the actual evaluation would take the same time, and you could speed things up slightly by simply clicking on "convert to regexp" for each one, although I think the saving would be slight.