in reply to Re: Optimization of Regexes
in thread Optimization of Regexes
Even though the output of the disassembly is cryptic, two things are quite clear: First, that every regular-expression string is “compiled” into the thing that is actually carried-out by the engine. Second, that as particular use-cases are identified that can be improved upon, more-efficient pseudoinstructions are devised and the regex-compiler is modified to generate them.
In the big picture, that ought to be considered, “free sweets.” Your already-well thought-out algorithm simply runs a few microseconds faster than before. Generally, disassembly of a complicated regex is most-useful as a way of cofirming that it actually does instruct the computer to do what you meant to say.