[fpc-pascal] Food for thought - language string improvement

Felipe Monteiro de Carvalho felipemonteiro.carvalho at gmail.com
Mon Jul 10 13:15:34 CEST 2017


On Mon, Jul 10, 2017 at 1:08 PM, Michael Van Canneyt
<michael at 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



More information about the fpc-pascal mailing list