Am 24.08.2020 um 21:01 schrieb Lars via fpc-pascal:
I've noticed some problem with another hashlist that after adding about 2000 items to it, it starts to have problems. There are duplicates added (possibly a collision?)

Is there a such thing as a perfect hashlist which never has a collision, or will they always have problems... In that case a regular but slower List might be of use for perfection.

If there is an error would it throw an exception?

Hash lists will always create collisions if enough elements are added. After all their purpose is to speed up the search thus they reduce the search space. This is by design.

If there should really be a problem with adding an element then an exception will be thrown.

Regards,
Sven
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to