[Lazarus] In search of a component for holding a table of strings

Mattias Gaertner nc-gaertnma at netcologne.de
Wed Jan 11 14:00:42 CET 2017


On Wed, 11 Jan 2017 13:16:34 +0100
Werner Pamler via Lazarus <lazarus at lists.lazarus-ide.org> wrote:

>[...]
> When running the test you'll see that the LazUtils tree is almost a 
> factor 2 slower than the fpc tree. (0.6 sec vs 0.36 sec for populating a 
> 1000x1000 table, 16 sec vs 9.8 sec for a 5000x5000 table). Any idea why 
> the Lazarus tree is slower although the tree code should be the same, 
> Mattias?

The FPC sources are compiled with -O2 and without any checks.
And TAvgLvlTree had a further call when comparing. I inlined that now.
Please test by compiling lazutils with -O2.
In my tests TAvgLvlTree is a bit faster than the old TAVLTree.

 
> You'll see also that the new optimized AddAscendingSquence speeds things 
> up considerably (4.6 sec vs 16 sec for 5000x5000).

Why should someone consider an unrealistic test?


> Since it calls the 
> normal Add if the new node does not fit at its assumed position I 
> suppose that nothing speaks against using this method as a general 
> replacement of Add in fpspreadsheet.

Probably.

Mattias


More information about the Lazarus mailing list