Skip to content

Conversation

@jaroslav-ryba
Copy link

The current version computes load using max_load_factor() without first setting m_bucket_count (default 0) leading to threshold 0, which triggers rehash (and size increase) on first insert.

Recompute the threshold after setting correct bucket count to avoid this.

The current version computes load using max_load_factor() without first
setting m_bucket_count (default 0) leading to threshold 0, which
triggers rehash (and size increase) on first insert.

Recompute the threshold after setting correct bucket count to avoid
this.
@Tessil Tessil merged commit 612c2be into Tessil:master Feb 2, 2025
11 checks passed
@Tessil
Copy link
Owner

Tessil commented Feb 2, 2025

Thanks for the fix! I merged the change.

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.

3 participants