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

Michael Van Canneyt michael at freepascal.org
Mon Jul 10 13:08:31 CEST 2017



On Mon, 10 Jul 2017, Felipe Monteiro de Carvalho wrote:

> 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.

The code is definitely not the same. 
In each case, it was measured. There is a 10% performance loss.

Michael.



More information about the fpc-pascal mailing list