[fpc-devel] inline... and philosophy
Sven Barth
pascaldragon at googlemail.com
Thu Nov 21 22:56:06 CET 2019
Am 10.11.2019 um 16:06 schrieb Michael Van Canneyt:
>
>
> On Sun, 10 Nov 2019, J. Gareth Moreton wrote:
>
>> This message chain has proven to be a lot more educational and
>> insightful than I would have given it credit for. Thanks everybody!
>>
>> I know a lot of the time, the size of binaries is just an illusion,
>> along with unfair comparisons with GCC (a behemoth with corporate
>> support) and Microsoft Visual C++ that often hides the size of
>> binaries behind a redistributable library. I don't ever seek to make
>> binaries smaller at the expense of speed, but if I see a potential
>> saving that could be done automatically, I dive for it!
>>
>> On 10/11/2019 14:47, Marco van de Voort wrote:
>>> (and btw, if you are serious about these scenarios, drop all
>>> optimization work immediately, and start working on packages :-)
>>
>> I did try to start simple with the 'uComplex' unit, but concerns were
>> raised because I changed the formal parameters to 'const' and aligned
>> the complex type on x86-64 platforms so it can take advantage of XMM
>> registers better (which, given proper optimisation, would result in
>> both smaller code size and higher speed). While I made sure that the
>> interfaces would not change for Pascal code, assembler code that
>> calls the functions (if it exists) might need to be changed slightly
>> (something Florian raised). I'm not quite sure what the rules are
>> when it comes fo updating packages, other than the obvious one of not
>> breaking old code.
>
> I think Marco referred to dynamically loadable packages (aka run-time
> packages)
In the meantime I've managed to fix the dynamic package support that had
experienced a bit of bit rot in the last years. Though I've currently
only tested Win32 and Win64 (x86_64-linux as well as *-darwin *should*
work as well). And as before only compile time packages are supported.
For those that are interested, the sizes of the binaries for chmls are
as follows:
=== output win32 begin ===
2633984 rtl.dll
414820 rtl.objpas.dll
247060 rtl.extra.dll
364625 rtl.generics.dll
389888 fcl.res.dll
788664 fcl.base.dll
962560 fcl.xml.dll
953676 chm.dll
68694 chmls.exe
=== output win32 end ===
=== output win64 begin ===
3707538 rtl.dll
601446 rtl.objpas.dll
345340 rtl.extra.dll
459357 rtl.generics.dll
568559 fcl.res.dll
1187518 fcl.base.dll
1602915 fcl.xml.dll
1419896 chm.dll
85131 chmls.exe
=== output win64 end ===
For those that wonder that rtl.generics is so small: the big part is
contained in the metadata .pcp file:
- Win32: 38442358 rtl.generics.pcp
- Win64: 38607350 rtl.generics.pcp
Yes, it's massive, but only required on the development machine. :)
Regards,
Sven
More information about the fpc-devel
mailing list