On Sun, 16 Feb 2025 at 21:15, François Dumont <frs.dum...@gmail.com> wrote:
>
> Hi
>
> A minor simplification.
>
> libstdc++: Simplify _Hashtable::_M_merge_multi
>
> When merging two hashtable instances of the same type we do not need
> to go through _M_src_hash_code that also check for identical Hash functor
> type.

But that check is very cheap, do we really gain much here?

If we're getting rid of _M_src_hash_code in this overload of
_M_merge_multi, should we get rid of it in the other overload too,
since that's the only other place that uses _M_src_hash_code?

>
> libstdc++-v3/ChangeLog:
>
>          * include/bits/hashtable.h
> (_Hashtable<>::_M_merge_multi(_Hashtable&)):
>          Remove usage of _M_src_hash_code and check directly if Hash is
> stateless
>          in the method.
>
> Tested under Linux x64.
>
> Ok to commit ?
>
> François
>

Reply via email to