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

Add inline caches #122

Open
codefrau opened this issue Mar 8, 2021 · 0 comments
Open

Add inline caches #122

codefrau opened this issue Mar 8, 2021 · 0 comments

Comments

@codefrau
Copy link
Owner

codefrau commented Mar 8, 2021

As pointed out by Stefan Marr inline caches could help improve lookup performance in the current JIT and even the interpreter. This is probably the simplest thing we can do right now to improve send performance (I wouldn't expect too much of a speedup though).

We might be able to add the cache to a CompiledMethod object on the fly. It could be a dictionary indexed by the send's pc.

Something would need to be stored in the selector objects too, for invalidation. Maybe a list of dict+pc pairs so individual entries can be invalidated.

Might need to hook into finalization to clean out garbage in these.

Ref: https://www.complang.tuwien.ac.at/kps09/pdfs/brunthaler.pdf

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