in reply to Re: Optimization of Regexes
in thread Optimization of Regexes

I get what your saying. The output of the debug is a bit cryptic to my eyes (I am still new) but clearly a difference between the versions.

Don't suppose the optimized regex gets stored anywhere accessible? (I don't see anything in perlvar, but you never know)

Replies are listed 'Best First'.
Re^3: Optimization of Regexes
by ikegami (Patriarch) on Sep 22, 2014 at 14:14 UTC

    but clearly a difference between the versions

    Specifically, a difference in the program into which the regex is compiled. As you mentioned, the difference is that the latter is more efficient to execute. It's slower to compile, though.

    Don't suppose the optimized regex gets stored anywhere accessible?

    What? What is it you want?

      And the difference is that the latter is more efficient to execute, though it's slower to compile

      Yep, I read you loud and clear there. I gather there is some way to override the default (if for some reason I did want to use the pre 5.10 way)? Just idle curiosity.

      What? What is it you want?

      Was just wondering if there was a way to get the optimized regex in a scalar without Regexp::Assemble, like maybe it gets stored in some var somewhere.

      No big deal if it doesn't, I am just playing/experimenting/learning at the moment.

        No way to override how the regex gets compiled.

        Are you operating on the mistaken belief that the pattern gets transformed before being compiled? The only transformation that happens is the compilation of the pattern, and I've already showed you how to see what that results in.