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

Improve performance of inner class method dispatch #20

Open
GoogleCodeExporter opened this issue Jul 3, 2015 · 0 comments
Open

Improve performance of inner class method dispatch #20

GoogleCodeExporter opened this issue Jul 3, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

Inner class handling is especially non-performant. Currently we pass an
unqualified "this" into RT.invoke() in inner-class methods, and then at
runtime have to scan through enclosing classes to find matching methods,
extracting the magic outer this pointer along the way.

We could instead use the type of the method we resolved at runtime to pass
"Enclosing.this" directly to RT.invoke() and do away with all of the outer
class scanning at runtime. There's probably some situation where that will
cause things to be more rigid than doing it at runtime, but I'm not
immediately thinking of it. If we fall back to an unqualified "this" iff we
fail to resolve the method, then perhaps that's the best of both worlds.

Original issue reported on code.google.com by [email protected] on 3 May 2010 at 2:57

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

No branches or pull requests

1 participant