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

Stear the user towards let #40

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Stear the user towards let #40

wants to merge 1 commit into from

Conversation

vchuravy
Copy link
Member

begin is a soft-scope so global variables created within are rooted through the module.

Instead users should use let so that the setup data is GC'd and not serialized into the cache file.

@vchuravy vchuravy requested a review from timholy June 28, 2024 15:47
@timholy
Copy link
Member

timholy commented Jun 29, 2024

Agreed. But I've found that using let sometimes negates the benefits of @compile_workload, I'm guessing because let is more likely to trigger compilation before one reaches

Core.Compiler.__set_measure_typeinf(true)
. If it compiles the whole let block before executing it, that's trouble.

@timholy
Copy link
Member

timholy commented Jun 29, 2024

The right way to check this would be to have a workload that includes a runtime-dispatched call to a non-precompiled method in another package. A little annoying to set up as a test but just giving it a whirl and seeing what happens shouldn't be too hard.

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.

2 participants