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

optimize how we check whether gc should happen #1146

Merged
merged 3 commits into from
Sep 13, 2024
Merged

optimize how we check whether gc should happen #1146

merged 3 commits into from
Sep 13, 2024

Conversation

dwightguth
Copy link
Collaborator

Previously we were computing whether garbage collection should occur on the hot path, which is not terribly efficient. We now compute this information in a more efficient way and only during slow allocations, leaving the fast path to only load a boolean global variable.

I did some profiling and this doesn't seem to have much impact on total memory usage, nor does it cause significantly more time spent in garbage collection.

@rv-jenkins rv-jenkins changed the base branch from master to develop September 12, 2024 20:20
@dwightguth dwightguth marked this pull request as ready for review September 13, 2024 16:34
Copy link
Collaborator

@theo25 theo25 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me

@dwightguth dwightguth merged commit d7503bd into develop Sep 13, 2024
10 checks passed
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