[fpc-pascal] Is the TFPGMap.KeyData()/TDictionary.TryGetValue() faster than TStringList.Values[]?

Marco van de Voort marcov at stack.nl
Thu Jan 14 10:27:06 CET 2016


In our previous episode, Maciej Izak said:
> >
> My results for FPC and TDictionary from Generics.Collections (
> https://github.com/dathox/generics.collections ):

If you need the in-order capacity of tstringlist then you can use

http://www.stack.nl/~marcov/genlight.pas
 
- It is iterator based though, no array access to keys.
- Slower than most map solutions.
- faster than (ordered) tstringlist.
- Some tests indicate that the TStringlist slowdown is postponed from
   a few 100k to say 5M elements. (then you would need another level
   of indirection, though blocksize tweaking might buy you an order more)
- iirc duplicates are always ignores. I need to fix that proprely sometime



More information about the fpc-pascal mailing list