Skip to content

Update descriptions of AHashMap and HashMap. Recommend AHashMap over HashMap by default. #11123

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
Jul 25, 2025

Conversation

Ivorforce
Copy link
Member

@Ivorforce Ivorforce commented Jul 19, 2025

Note: Will need to go through a core meeting before this can be merged. (Edit: Approved in core meeting)

AHashMap is way faster than HashMap in nearly all circumstances. HashMap on the other hand has some 'defensive' affordances built in. However, these affordances are not expected for C++ map types: No std map type grants these, probably because they are what makes HashMap so slow. In addition, most users of map types do not need these affordances.
In the interest of performance, this changes the recommended map type to AHashMap.

@Ivorforce Ivorforce requested a review from Calinou July 19, 2025 16:31
@Ivorforce Ivorforce added enhancement area:contributing Issues and PRs related to the Contributing/Development section of the documentation labels Jul 19, 2025
Copy link
Contributor

@dsnopek dsnopek left a comment

Choose a reason for hiding this comment

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

This looks good to me!

@Ivorforce Ivorforce marked this pull request as ready for review July 23, 2025 15:49
Copy link
Member

@mhilbrunner mhilbrunner left a comment

Choose a reason for hiding this comment

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

Needs a rebase to fix CI :)

Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

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

Makes sense to me.

Copy link
Contributor

@skyace65 skyace65 left a comment

Choose a reason for hiding this comment

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

Grammar and spelling wise this looks good

@skyace65 skyace65 merged commit c2d94e2 into godotengine:master Jul 25, 2025
1 check passed
@skyace65
Copy link
Contributor

Thanks!

@Ivorforce Ivorforce deleted the ahashmap-default branch July 25, 2025 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:contributing Issues and PRs related to the Contributing/Development section of the documentation enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants