-
-
Notifications
You must be signed in to change notification settings - Fork 267
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
Allocate empty group on heap only for std::allocator
#254
Conversation
std::allocator
std::allocator
Thanks for implementing this! Do you know if it would result in a perf regression if we didn't have |
Regarding the perf regression, I very much doubt you could see any difference in real world use. This is why I prefer optimizing for correctness and overall good behavior (for example with poor hash functions) rather than for micro benchmarks. I don't think storing the |
Thanks again for bringing up this issue @AgostonSzepessy ! |
Thank you for fixing it so quickly! |
|
||
return const_cast<ctrl_t*>(empty_group); | ||
} | ||
return nullptr; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Warning in VS 2022:
phmap.h(341): warning C4702: unreachable code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Fixed in 2d0b499.
Otherwise leave
ctrl_
as a nullptr.