[fpc-pascal] TFPGMap retrieving values

Marco van de Voort fpc at pascalprogramming.org
Fri May 1 22:40:03 CEST 2020


Op 2020-05-01 om 20:15 schreef Sven Barth via fpc-pascal:
> Ryan Joseph via fpc-pascal <fpc-pascal at lists.freepascal.org 
> <mailto:fpc-pascal at lists.freepascal.org>> schrieb am Fr., 1. Mai 2020, 
> 17:48:
>
>
>
>     > On May 1, 2020, at 10:18 PM, Sven Barth
>     <pascaldragon at googlemail.com <mailto:pascaldragon at googlemail.com>>
>     wrote:
>     >
>     > 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.
>
>     and btw, why isn't there a TFPGHashList? I can't find one anyways.
>
>
> Because none was needed. Fgl is mainly a demonstrator for the generic 
> feature and nowadays mainly useful for smaller targets. The main 
> suggestion is to use Collections.Generics and there the TDictionary 
> class.
>
And don't forget to benchmark. If you test/search for existence of 
items, a faster hash that looks up faster but takes long to build and 
eats more memory might be counter productive.


More information about the fpc-pascal mailing list