: Get usage specifics for a hash table.
get-hash <hash > \
( length [ define ] <length> ) \
| ( size [ define ] <size> ) \
| ( average-reads [ define ] <reads> )
get-hash provides usage specifics of a hash table <hash> (created by new-hash
Use "length" clause to obtain its <length> (i.e. the number of elements stored in it), "size" clause to obtain its <size> (i.e. the number of "buckets", or possible hash codes) and "average-reads" clause to obtains the average number of <reads> (i.e. how many string comparisons are needed on average to find a key).
Each of these number variables can be created with "define".
This information may be useful in determining the performance of a hash, and whether resize-hash
get-hash h length define l size define s average-reads define r
( get-hash new-hash purge-hash read-hash resize-hash write-hash
) SEE ALL