[PATCH v3 01/19] gdbsupport: add unordered_dense.h 4.4.0

Christian Biesinger cbiesinger@google.com
Wed Aug 21 18:45:17 GMT 2024


On Mon, Aug 19, 2024 at 10:30 PM Simon Marchi <simon.marchi@efficios.com> wrote:
>
> Add a copy of unordered_dense.h from [1].  This file implements an
> efficient hash map and hash set with a nice C++ interface (a near
> drop-in for std::unordered_map and std::unordered_set).  This is
> expected to be used to replace uses of `htab_t`, for improved code
> readability and type safety.  Performance-wise, it is preferred to the
> std types (std::unordered_map and std::unordered_set) due to it using
> open addressing vs closed addressing for the std types.

Have you done any benchmarks for this hashtable, either vs htab_t or
vs std::unordered_map?

What's not clear to me is how this should be used. Should all uses of
hashmaps/sets use these new classes? If not when should you use this
vs the std version? And can this be explained somewhere?

Christian


More information about the Gdb-patches mailing list