Am 04.04.2017 05:25 schrieb "Ryan Joseph" <r...@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
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to