Hash??? Not quite clear on what this is...

John Hritz jih at ox.com
Sat Nov 24 08:31:55 AEST 1990


	Hashing can also be thought of as an engineering trade-off between
space and time.  There are far more efficient methods of storing a list of
data items, but hashing can have the benifit of yeilding the searched for data
faster than the overhead associated with a linear, binary or tree search.
The basic balancing point:  will it take longer to calculate the hash index
and deal with collisions than it will to  search by comparisons.  Generally,
if the list is of moderate size, temporary in lifespan and a hash value can
be calculated that doesn't result in a lot of collisions, hashing is a win.
Otherwise memory, collisions, or the exoticness of your hash function start
to eat into your speed gains.
-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
     John I. Hritz                               Photons have mass?!
     jih at ox.com                                       I didn't know they
     313-930-9126                                             were catholic!



More information about the Comp.lang.c mailing list