Am 01.05.2020 um 16:12 schrieb Ryan Joseph via fpc-pascal:
I've been starting to use the RTL so I'm not very familiar with it but I 
thought TFPGMap was supposed to be a hash table for fast lookup, so why does 
TFPSMap.Find using a binary search instead of computing a hash key and indexing 
into the array like that? Is this not the type I should be using in the RTL for 
a generic hash table? What even is TFPGMap supposed to be if it isn't a hash 
table?

It is a map. It maps keys to values. Nowhere does it say how the map is implemented.

If you need to decide which map to use I suggest you to look at this benchmark page: http://www.benibela.de/fpc-map-benchmark_en.html You can select various of the maps that FPC supports (both ones distributed with FPC and third party ones) and compare them.

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

Reply via email to