Re: Downwardly Scalable Systems

Liste des GroupesRevenir à c misc 
Sujet : Re: Downwardly Scalable Systems
De : invalid (at) *nospam* invalid.invalid (Richard Kettlewell)
Groupes : comp.misc
Date : 15. Apr 2024, 18:40:16
Autres entêtes
Organisation : terraraq NNTP server
Message-ID : <wwvzftuv81r.fsf@LkoBDZeT.terraraq.uk>
References : 1 2 3 4 5
User-Agent : Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
not@telling.you.invalid (Computer Nerd Kev) writes:
D <nospam@example.net> wrote:
On Sun, 14 Apr 2024, Computer Nerd Kev wrote:
In fact in terms of memory and disk storage GCC keeps going
backwards that even for C/C++. Compiling large C/C++ programs with
-Os in ever newer GCC versions keeps producing ever bigger binaries
for unchanged code. Of course other compilers are available and I'm
not sure how other popular ones compare.
 
Why do they go backwards?
>
I'd be quite interested to find out as well. When it comes to the
more fine-tuned optimisation options (a set of which -Os enables),
the GCC documentation is often very lacking in detail, especially
when it comes to changes between versions.

Interesting question, and I don’t know the answer, but it’s not hard to
come up with a small concrete example. https://godbolt.org/z/sG5d99v5z
has the same code compiled at -Os with three different versions, plus
-O2 for comparison, and it does get a bit longer somewhere between 9.1
and 11.1.

The longer code uses one extra register (ebp) and because it’s run out
of callee-owned registers it must generate a push/pop pair for it
(adding 2 bytes to a 90-byte function, in this case).

It’s not easily explainable why it would do so: the gcc 9.1 object code
happily uses eax for the same purpose, without having to shuffle else
anything around, since eax isn’t being used for anything else at the
time.

Perhaps worth a bug report.

--
https://www.greenend.org.uk/rjk/

Date Sujet#  Auteur
13 Apr 24 * Downwardly Scalable Systems16Ben Collver
13 Apr 24 `* Re: Downwardly Scalable Systems15Stefan Ram
13 Apr 24  +* Re: Downwardly Scalable Systems3David LaRue
13 Apr 24  i`* Re: Downwardly Scalable Systems2Stefan Ram
13 Apr 24  i `- Re: Downwardly Scalable Systems1Scott Dorsey
14 Apr 24  `* Re: Downwardly Scalable Systems11Computer Nerd Kev
14 Apr 24   +- Re: Downwardly Scalable Systems1Ben Collver
14 Apr 24   `* Re: Downwardly Scalable Systems9D
15 Apr 24    +* Re: Downwardly Scalable Systems5Computer Nerd Kev
15 Apr 24    i+* Re: Downwardly Scalable Systems2D
15 Apr 24    ii`- Re: Downwardly Scalable Systems1candycanearter07
15 Apr 24    i`* Re: Downwardly Scalable Systems2Richard Kettlewell
15 Apr 24    i `- Re: Downwardly Scalable Systems1D
16 Apr 24    `* Re: Downwardly Scalable Systems3Scott Dorsey
16 Apr 24     +- Re: Downwardly Scalable Systems1Richard Kettlewell
16 Apr 24     `- Re: Downwardly Scalable Systems1D

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal