Skip to content

Conversation

@lyq2333
Copy link
Contributor

@lyq2333 lyq2333 commented Dec 8, 2023

If a dict is empty before dictExpand, we don't need to do rehashing actually. We can just create a new dict and set it as ht_table[0] to skip incremental rehashing and free the memory quickly.

With this PR, I think we can resize empty dicts in tryResizeHashTables as introduced in #12819.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants