Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redundant bytecodes #7

Open
hyperpape opened this issue Mar 9, 2024 · 0 comments
Open

Redundant bytecodes #7

hyperpape opened this issue Mar 9, 2024 · 0 comments

Comments

@hyperpape
Copy link
Owner

hyperpape commented Mar 9, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant