Get array

Purpose: Get usage specifics for an array.

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

get-array provides usage specifics of an <array> (created by new-array).

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 array codes in the underlying hash table).

"average-reads" clause will obtain in <reads> the average number of array-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 array, and whether resize-array is indicated.
Examples
 get-array h length l hash-size s average-reads r

See also
Array
get-array  
new-array  
purge-array  
read-array  
resize-array  
write-array  
See all
documentation


Copyright (c) 2019-2024 Gliim LLC. All contents on this web site is "AS IS" without warranties or guarantees of any kind.