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

silvioprog silvioprog at gmail.com
Fri Jan 15 00:18:48 CET 2016

On Thu, Jan 14, 2016 at 6:27 AM, Marco van de Voort <marcov at stack.nl> wrote:

> 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's a nice unit, and it should be available in FCL.

- 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

I need to do some tests. Thanks for share it. :-)

Silvio Cl├ęcio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20160114/4c49c6b1/attachment.html>

More information about the fpc-pascal mailing list