Isn't it strange that the noCapture case is faster than the noParens??
Here's what use re 'debug' gets me for the 4 regex variants:
The TAIL(7) on the noCapture case looks redundant to me; maybe that's something they fixed in 5.8.0?Compiling REx `(est|\d)' size 10 first at 3 1: OPEN1(3) 3: BRANCH(6) 4: EXACT <est>(8) 6: BRANCH(8) 7: DIGIT(8) 8: CLOSE1(10) 10: END(0) minlen 1 Compiling REx `(?:est|\d)' size 7 1: BRANCH(4) 2: EXACT <est>(7) 4: BRANCH(6) 5: DIGIT(7) 6: TAIL(7) 7: END(0) minlen 1 Compiling REx `est|\d' size 6 1: BRANCH(4) 2: EXACT <est>(6) 4: BRANCH(6) 5: DIGIT(6) 6: END(0) minlen 1 Compiling REx `est' size 3 first at 1 1: EXACT <est>(3) 3: END(0) anchored `est' at 0 (checking anchored isall) minlen 3 Compiling REx `\d' size 2 first at 1 1: DIGIT(2) 2: END(0) stclass `DIGIT' minlen 1
What happens if you look at those regexes under 5.8.0 with -Dr or use re 'debug', please?
( Edit: Zaxo did this just above, and got the same results, except he gets offsets. No idea what those mean...)
--
Mike
In reply to Re^3: RE performance
by RMGir
in thread RE performance
by Vennis
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |