[fpc-devel] Feature announcement: Generic functions, procedures and methods

Sven Barth pascaldragon at googlemail.com
Tue Nov 24 12:14:25 CET 2015


Am 24.11.2015 08:04 schrieb "Michael Schnell" <mschnell at lumino.de>:
>
> Is this syntax candy for automatically creating multiple functions
(completely dedicated code for each type (combination) it is called with)
(in fact optimizing for CPU usage), or is a single code sequence generated
that takes different branches at certain locations (in fact optimizing for
code size) ?

It's the first one. This is also the case for generic types by the way, so
nothing new here...
(And before someone asks: yes, right now there are situations where this
leads to code bloat, but my plan is to sometime(TM) add a link time
optimization or WPO pass that combines code of specializations with the
same types in different units again)

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20151124/a0a65703/attachment.html>


More information about the fpc-devel mailing list