Wireshark mailing list archives

Re: RFC: sorted value_string + bsearch


From: Jakub Zawadzki <darkjames () darkjames ath cx>
Date: Thu, 22 Apr 2010 15:40:28 +0200

On Tue, Apr 20, 2010 at 11:43:49PM +0200, Anders Broman wrote:
Would it be faster to use hash tables instead of very large 
value_strings? In diameter i think
3gpp AVP codes are in a value_string > 2k

I think main problem with hash tables, is that you need to have
big table, and good hash function.

Binary search is O(log2 n), so for 5k we have at most 13 lookups.
To achieve it with hash table we need 384 (5000/13) buckets (HASHPORTSIZE in addr_resolv.c is only 256).

And I think it's hard to implement hash tables, using current value_string ABI.

Cheers.
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe


Current thread: