While working on needle, I saw a number of places where the bytecode of mako is larger than it should be. This isn't likely to be an issue for correctness, but it's uglier and harder to read. In addition, creating larger methods might sometimes inhibit inlining and cause worse performance.
For once example, while compiling the regex (ab|a|bcdef|g)+ the implementation at the time was producing output like:
280: goto 283
283: goto 286
286: aload_0
In general, I remember having difficulty with the handling of nested control flow, so it's likely that code could be improved.
While working on needle, I saw a number of places where the bytecode of mako is larger than it should be. This isn't likely to be an issue for correctness, but it's uglier and harder to read. In addition, creating larger methods might sometimes inhibit inlining and cause worse performance.
For once example, while compiling the regex
(ab|a|bcdef|g)+the implementation at the time was producing output like:In general, I remember having difficulty with the handling of nested control flow, so it's likely that code could be improved.