Re: Fw: binary size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




________________________________
From: Ming Cheng <chengm349@xxxxxxxxxxx>
Sent: Wednesday, January 5, 2022 1:17 AM
To: Jonathan Wakely <jwakely.gcc@xxxxxxxxx>
Subject: Re: Fw: binary size

Hi Jonathan,

Thanks for this nice advice. I'd like to learn more about cmd size. Among text/data/bss sections, which section(s) has the most impact to the perf? You are right that people should do actual test. But for the same code, in theory, larger size's perf should be always <= smaller size's .

Warm regards
Ming
________________________________
From: Jonathan Wakely <jwakely.gcc@xxxxxxxxx>
Sent: Tuesday, January 4, 2022 12:12 PM
To: Ming Cheng <chengm349@xxxxxxxxxxx>
Cc: gcc-help <gcc-help@xxxxxxxxxxx>
Subject: Re: Fw: binary size

On Tue, 4 Jan 2022 at 11:42, Ming Cheng <chengm349@xxxxxxxxxxx> wrote:
>
> Hi Jonathan,
> I just pasted a lib. It's applicable to binary. I am wondering whether there is a way to generate smaller binary by ver 10.2.1 close to 7.3.1? Would bigger size binary slower ?

It depends why it's bigger. As I said, it's probably due to debug
info, which doesn't affect performance at all. Using 'ls' to check the
size is not helpful, because it doesn't tell you anything about the
size of the executable code in the binary. Use 'size' to do that. Even
if that shows the code is bigger, that doesn't mean it's going to be
slower. The only way to tell if it's slower is to measure if it's
slower.

tl;dr it depends.




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux