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

Excessive memory usage in boot and mi eval #701

Open
larshum opened this issue Mar 7, 2023 · 0 comments
Open

Excessive memory usage in boot and mi eval #701

larshum opened this issue Mar 7, 2023 · 0 comments

Comments

@larshum
Copy link
Contributor

larshum commented Mar 7, 2023

The mi interpreter, and to a lesser extent also the boot interpreter, uses a significant amount of memory during the bootstrapping. Running the first bootstrapping stage with boot leads to a peak memory usage of around 1.1 GB while using the mi interpreter (as in mi eval src/main/mi-lite.mc -- 0 src/main/mi-lite.mc mi-lite) memory usage peaks at 4.4 GB. This gets even worse after #697.

I've found that one reason for this is the filename part of the info fields. I hacked together a version of the compiler where the filename is converted to a SID rather than a String (so an integer rather than a string encoding the full path of the file each AST node originates from). This led to worse runtime performance (as I said, it is a hacked-together solution), but peak memory usage drops to 0.7 GB for boot and 1.7 GB for mi eval. I think this suggests that we need to consider how we represent the filenames in our info-fields. You can find the hacked-together code at https://github.com/larshum/miking/tree/sid-hack.

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