lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

>To optimize the numeric style arrays you could do it even easier.  Don't
>rehash if the "direct slot" for the key is free.  That way you'ld get
>nearly 100% for these arrays.  That hash function for numerics has this
>property: hash(i+1)==hash(i)+1  So consecutive keys give consecutive
>slots -> 100% fill rate.

Good point.  Sounds kind of cool.