[fpc-pascal] Food for thought - language string improvement
Felipe Monteiro de Carvalho
felipemonteiro.carvalho at gmail.com
Mon Jul 10 13:02:07 CEST 2017
On Mon, Jul 10, 2017 at 12:52 PM, Michael Van Canneyt
<michael at freepascal.org> wrote:
> There is no performance improvement, rather the contrary. The generic list
> works slower than the native list.
I meant that C++ templates (and maybe Pascal generics which are very
similar if I am not wrong) are faster than Java generics. Maybe it has
to do with that primitive types in Java cannot be added to generics at
all, but need to be wrapped in an object.
I also don't see why a template list would be slower than a fixed-type
one. It should be the same. Its just a copy of the same code.
Anyway C++ guys claim that templates are faster than Java generics,
I'm just repeating what I heard.
If they aren't faster, then Java has better generics, because they are
easier to use and debug.
--
Felipe Monteiro de Carvalho
More information about the fpc-pascal
mailing list