Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

C hash tables

Name: Anonymous 2012-02-12 3:13

I thought C hash tables were supposed to be special data types that made searching for values more efficient...

Looking through the source code for various implementations of hash tables in C it seems looking up a value amounts to going through them one by one until you get the one you need.
Was looking at http://pokristensson.com/strmap.html in particular. Shit sucks

Name: Anonymous 2012-02-12 3:32

>>1
I haven't looked at that implementation, but almsot all hashtable implementations do resort to looking up (such as within a linked list) if there are hash collisions. Don't want those? Use a better hash algorithm, or allow your hashtable implementation to use user-supplied ones.

Name: Anonymous 2012-02-12 4:00


Don't change these.
Name: Email:
Entire Thread Thread List