Am 10.07.2017 13:19 schrieb "Michael Van Canneyt" <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> 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. You might want to test with the list provided by the rtl-generics package. Regards, Sven
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal