Wireshark-dev: [Wireshark-dev] Re: Diameter string hash

Date Prev · Date Next · Thread Prev · Thread Next
From: John Thacker <johnthacker@xxxxxxxxx>
Date: Fri, 25 Jul 2025 09:22:10 -0400
On Fri, Jul 25, 2025 at 9:15 AM Anders Broman <a.broman58@xxxxxxxxx> wrote:
Hi,
Is the Diameter special string hash and string equal function really needed? 

It looks like it's a case-insensitive hash and string equality function. I don't know if that's faster than doing a one-time upper or lower case conversion before inserting or looking up keys.
That might depend on the size of the hash map.

If it is faster, it might be worth having as a generic hash; there might be some cases where we use a tree lookup with case-insensitivity that might be faster with a hash table and that.
(E.g., the lookup to see if a preference module is already registered in prefs.c)

Cheers,
John