Am 10.07.2017 um 15:00 schrieb Sven Barth via fpc-pascal: > Am 10.07.2017 13:19 schrieb "Michael Van Canneyt" > <mich...@freepascal.org <mailto:mich...@freepascal.org>>: >> >> >> >> On Mon, 10 Jul 2017, Felipe Monteiro de Carvalho wrote: >> >>> On Mon, Jul 10, 2017 at 1:08 PM, Michael Van Canneyt >>> <mich...@freepascal.org <mailto:mich...@freepascal.org>> wrote: >>>> >>>> The code is definitely not the same. In each case, it was measured. > There is >>>> a 10% performance loss. >>> >>> >>> I'd love a source on this one. I guess you mean in Free Pascal? >> >> >> Obviously. >> >> The classes unit can be recompiled to use the fgl (well, that used to > be so) >> as a basis. When using the resulting list and stringlist, there was a 10% >> performance loss. The main reason - If I recall correctly - was that > the fgl needs to resort to move() operations instead of direct assignments. > > The fgl classes don't use Move(), but they have a virtual method that > does the assignment between the specialized parameters that's inherited > from the non-generic parent list type.
... which is done to avoid bloat. fgl specialized only a wrapper around an internal list. So the slightly slower code in some cases reduced executable size. _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal