[fpc-pascal] Setting record values
Sven Barth
pascaldragon at googlemail.com
Tue Apr 4 09:06:20 CEST 2017
Am 04.04.2017 05:25 schrieb "Ryan Joseph" <ryan at thealchemistguild.com>:
>
> Thanks for the tips, I appreciate it.
>
> This is all pretty trivial but it’s kind of annoying that using an inline
class function is more efficient than a constructor despite having
identical functionality. It's tempting to remove the constructors now and
replace them with inline functions but it seems like the compiler should be
smarter and make this optimization for me.
At least for classes and objects the constructor is a bit more complicated
(especially the former ones), so that may be the reason that nothing is
done there for record constructors either. I'll check whether I can at
least get them to paricipate in auto inlining so that they would at least
be automatically inlined at higher optimization levels.
Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20170404/1a448a91/attachment.html>
More information about the fpc-pascal
mailing list