Re: [fpc-pascal] TFPGMap retrieving values

2020-05-02 Thread Sven Barth via fpc-pascal
Ryan Joseph via fpc-pascal schrieb am Sa., 2. Mai 2020, 12:33: > > > > On May 1, 2020, at 10:18 PM, Sven Barth > wrote: > > > > 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 >

Re: [fpc-pascal] TFPGMap retrieving values

2020-05-01 Thread Marco van de Voort
Op 2020-05-01 om 20:15 schreef Sven Barth via fpc-pascal: Ryan Joseph via fpc-pascal > schrieb am Fr., 1. Mai 2020, 17:48: > On May 1, 2020, at 10:18 PM, Sven Barth mailto:pascaldra...@googlemail.com>> wrote: > > If you need to

Re: [fpc-pascal] TFPGMap retrieving values

2020-05-01 Thread Sven Barth via fpc-pascal
Ryan Joseph via fpc-pascal schrieb am Fr., 1. Mai 2020, 17:48: > > > > On May 1, 2020, at 10:18 PM, Sven Barth > 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

Re: [fpc-pascal] TFPGMap retrieving values

2020-05-01 Thread Ryan Joseph via fpc-pascal
> On May 1, 2020, at 10:18 PM, Sven Barth 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

Re: [fpc-pascal] TFPGMap retrieving values

2020-05-01 Thread Ryan Joseph via fpc-pascal
> On May 1, 2020, at 10:18 PM, Sven Barth wrote: > > 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 >

Re: [fpc-pascal] TFPGMap retrieving values

2020-05-01 Thread Sven Barth via fpc-pascal
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

[fpc-pascal] TFPGMap retrieving values

2020-05-01 Thread 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