Skip to content

Increase default capacities #7753

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

Merged
merged 1 commit into from
Apr 19, 2025
Merged

Conversation

bhansconnect
Copy link
Member

Based on a discussion with Richard (quite a while ago at this point), lets default to over-allocating our array sizes. This is in hopes that the normal flow never reallocates. We really don't use that much memory in total and this enables the compiler to see solid speed gains. Until we find a reason not to or get better heuristics, lets use memory to save time.

Also removes and extraneous debug print and updates one case of initWithCapacity to initCapacity

Based on a discussion with Richard (quite a while ago at this point),
lets default to over-allocating our array sizes. This is in hopes that the normal flow never reallocates.
We really don't use that much memory in total and this enables the compiler to see solid speed gains.
Until we find a reason not to or get better heuristics, lets use memory to save time.
@bhansconnect bhansconnect enabled auto-merge April 19, 2025 04:20
Copy link
Collaborator

@Anton-4 Anton-4 left a comment

Choose a reason for hiding this comment

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

Thanks @bhansconnect :)

@bhansconnect bhansconnect merged commit e8ff787 into main Apr 19, 2025
21 checks passed
@bhansconnect bhansconnect deleted the bhansconnect/push-vyupzvmzuyln branch April 19, 2025 08:47
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