in reply to Re^3: RE performance
in thread RE performance

I think I got a line on that one (i finally read perldebguts), and I quote (cause I likes to ;)

    # Do nothing
    NOTHING     no      Match empty string.
    # A variant of above which delimits a group, thus stops optimizations
    TAIL        no      Match empty string. Can jump here from outside.
So i guess this is because qr{} will generate patterns like that, and you normally wouldn't use /(?:foo|\d)/, you'd do something like /$pat|$QRed2/. This is because if perl sees
4: BRANCH(6)
5:   DIGIT(6)
which means there are no patterns after DIGIT , it can optimize (cause the digit in parentheses is the index to the next pattern, or something along those lines), and that's not neccessarily true if you got (?:). I think it's one of those overlooked optimizations (hopefully japhy will answer concretely ~ i'm not a re => god yet ;D).

No idea what this offsets thing is, I don't get it , but then I don't have perl compiled with the -DDEBUGGING, so it might relate to that somehow.

____________________________________________________
** The Third rule of perl club is a statement of fact: pod is sexy.