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

me: Replace runtime clazzes by clazz-local map of actual clazzes, fix #2408 #2413

Merged
merged 1 commit into from
Jan 4, 2024

Conversation

fridis
Copy link
Member

@fridis fridis commented Jan 4, 2024

The use of unique ids for all AST elements that need runtime clazz information plus arrays large enough to hold all these ideas in every clazz instance results in memory demand quadratic to the code size resulting in the high memory demand for arrays used in ryu.fz and reported in #2408.

This patch replaces these large arrays by per-clazz TreeMaps that contain only those actual clazzes that are actually needed for that clazz.

This also adds some NYI-comments related to #2411 and #2412.

This removes caching of Callable created in the interpreter, so this might have a negative impact on interpreter performance. We might to re-introduce a caching mechanism if this turns out to be very costly.

…2408

The use of unique ids for all AST elements that need runtime clazz information
plus arrays large enough to hold all these ideas in every clazz instance results
in memory demand quadratic to the code size resulting in the high memory demand
for arrays used in ryu.fz and reported in #2408.

This patch replaces these large arrays by per-clazz TreeMaps that contain only
those actual clazzes that are actually needed for that clazz.

This also adds some NYI-comments related to #2411 and #2412.

This removes caching of Callable created in the interpreter, so this might have
a negative impact on interpreter performance.  We might to re-introduce a
caching mechanism if this turns out to be very costly.
@fridis fridis merged commit 1479712 into main Jan 4, 2024
5 checks passed
@fridis fridis deleted the fix_2408 branch January 4, 2024 17:05
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

Successfully merging this pull request may close these issues.

None yet

2 participants