Vely logo Empower C
install  tutorials  examples
documentation  license  about

12.1.0 released on Sep 19, 2022

get-hash



PURPOSE:


Get usage specifics for a hash table.

SYNTAX:


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


DESCRIPTION:


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 is indicated.

EXAMPLES:


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


SEE ALSO:


Hash table ( get-hash   new-hash   purge-hash   read-hash   resize-hash   write-hash  )  SEE ALL (documentation)



Copyright (c) 2022 DaSoftver LLC. Vely is a trademark of Dasoftver LLC. The software and information herein are provided "AS IS" and without any warranties or guarantees of any kind. Icons copyright PaweĊ‚ Kuna licensed under MIT. This web page is licensed under CC-BY-SA-4.0.