ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-dev: Re: [Wireshark-dev] Hash map implementation for wmem

From: Evan Huus <eapache@xxxxxxxxx>
Date: Wed, 23 Apr 2014 09:14:18 -0400
On Wed, Apr 23, 2014 at 9:11 AM, Anders Broman
<anders.broman@xxxxxxxxxxxx> wrote:
>     >In my benchmarks it is measurably slower than GHashTable, but not
> excessively
>
>     >so. Given the additional security it provides this seems like a
> reasonable
>
>     >trade-off (and it is still faster than a wmem_tree).
>
>
>
> Any idea what makes I slower? The hash algorithm?
> http://www.azillionmonkeys.com/qed/hash.html

Effectively. It has to do a fair bit more work per hash in order to
properly mix in the randomness and prevent algorithmic complexity
attacks.

The implementation is simpler, so there are probably other areas where
glib is slightly more optimized, but I expect the stronger hash is
most of it.

Evan