-
Notifications
You must be signed in to change notification settings - Fork 2.3k
internals: optimize std::unordered_map internals with noexcept #5960
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
base: master
Are you sure you want to change the base?
internals: optimize std::unordered_map internals with noexcept #5960
Conversation
|
Hi @Skylion007, below is a Cursor (GPT-5.2 Codex Extra High) generated assessment regarding ABI compatibility. Could you please take a look? This goes so deep, I cannot be sure about it without further experimentation. My current thinking: To be safe, defer merging this PR until we bump the internals version for #5879 and #5887; in other words, add this PR to the "deferred until next internal version bump" group. — Which could be very soon. I'm still looking a bit into the subinterpreter leak issue (see comments under #5958), but at this minute I'm thinking we're in good shape for making a release with what we have on master. Right after we could bump the internals version and merge the whole group. PR 5960 ABI Compatibility Assessment (pybind11)Executive summary
What changed in the PRThe diff adds
These are in libstdc++ ground truth (GCC 13 headers)Cache policy depends on
|
|
Yeah, I wasn't tracking that the container's node structure changes depending on whether the hash function is noexcept. So this is ABI incompatible, sorry for the misunderstanding! |
Description
More detailed discussion here: https://quuxplusone.github.io/blog/2024/08/16/libstdcxx-noexcept-hash/
Regardless, the STL contract here says they should be marked as noexcept regardless of perf differences so good practice to do so.
Suggested changelog entry: