GOLF(2gg)

NAME
get-hash - (hash)

PURPOSE
Get usage specifics for a hash.

SYNTAX

        get-hash  <hash > \
            ( length <length> ) \
            | ( hash-size <hash size> ) \
            | ( average-reads <reads> )

DESCRIPTION
get-hash provides usage specifics of a <hash> (created by new-hash).

Use "length" clause to obtain its <length> (i.e. the number of elements stored in it), "hash-size" clause to obtain its <hash size> (i.e. the number of "buckets", or possible hash codes in the underlying hash table).

"average-reads" clause will obtain in <reads> the average number of reads (i.e. how many string comparisons are needed on average to find a key) multiplied by 100 (so if an average number of reads was 1.5, it will be 150).

This information may be useful in determining the performance of a hash, and whether resize-hash is indicated.

EXAMPLES

        get-hash h length l hash-size s average-reads r

SEE ALSO
 Hash

get-hash new-hash purge-hash read-hash resize-hash write-hash See all documentation