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? Because I searching the web C++ developers seam all sure that templates are the 7th wonder and so fast. And in Java I am 110% certain that generics add zero performance penalty. Generics don't even exist in Java after compilation, they don't produce any different code than if you had hard-coded Object. It's just a compile type type-checking. Under the hood there is only 1 code operating on Object instances. It is backwards compatible to pre-generic Java and it can't possibly impact performance. -- Felipe Monteiro de Carvalho _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal