[Freemint-list] Beyond Brown
Peter Slegg
p.slegg at scubadivers.co.uk
Wed Mar 15 02:21:44 MSK 2017
>Date: Wed, 1 Mar 2017 13:21:14 +0100
>From: Markus Fr?schle <mfro999 at gmail.com>
>Subject: Re: [Freemint-list] Beyond Brown
>To: freemint-list <freemint-list at mail.atariforge.org>
>Message-ID:
> <CA+p-OFXcMsAPp-+ktaa5JZw8QDHpB3JH5NBE_AFJ8UhZkYLoCQ at mail.gmail.com>
>On Wed, Mar 1, 2017 at 11:22 AM, Adam Klobukowski <adamklobukowski at gmail.com
>> wrote:
>
>>
>> With elf binary we could use linking options like Ffunction-sections
>> fdata-sections flto, that allow linker to remove unused functions and data
>> from the resulting binary. We all do not like 100kb hello world programs,
>> and with that they would shrink considerable.
>>
>>
>
>What -flto does it does is actually much smarter: it delays optimization to
>link time and thus does enables cross-module optimizing. Basically, all
>objects keep their original source (in gcc's internal format) in a special
>section. On final link, ld does not use the binary object, but takes all
>the sources out of that section and glues them together just as if it were
>one large compilation unit, compiling them altogether. This enables it to
>act much smarter regarding inlining it could do otherwise.
>
>I have done a comparision of m68k-atari-mint-gcc and m68k-elf-gcc with
>EmuTOS (which supports both compilers) a few months ago to see what LTO can
>do for m68k.
>
>There are differences regarding size in general: newer gcc versions seem to
>invest more program size into optimization at higher optimization levels
>than our 4.6.4 mint version does, but also can do better size optimization
>when told to do so with -Os.
>
>Actually, the size improvements from -flto were below 2-3% best case. With
>a (pretty non-scientific) brief GEMBENCH benchmark, there were speed
>improvements in around the same percentage area.
>
>Bottom line is: while it certainly would be desireable to always have the
>latest and best toolchain available, do not expect too much from it...
I wouldn't say no to any small improvements in speed, especially with the
ported tools.
There may be other benefits in the future from having the latest toolchain
especially if it will keep Netsurf on board.
Peter
More information about the Freemint-list
mailing list