From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,945d0baf2e74e805 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-06-28 15:34:23 PST Path: archiver1.google.com!news2.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-han1.dfn.de!news-stu1.dfn.de!news.belwue.de!cert.uni-stuttgart.de!news.enyo.de!not-for-mail From: Florian Weimer Newsgroups: comp.lang.ada Subject: Re: Creating really small binaries? Date: Sat, 29 Jun 2002 00:34:17 +0200 Organization: Enyo -- not your organization Message-ID: <871yar9gnq.fsf@deneb.enyo.de> References: <5ee5b646.0206260008.4a99c12d@posting.google.com> NNTP-Posting-Host: deneb.enyo.de Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: cygnus.enyo.de 1025303649 7630 212.9.189.171 (28 Jun 2002 22:34:09 GMT) X-Complaints-To: abuse@enyo.de NNTP-Posting-Date: 28 Jun 2002 22:34:09 GMT Cancel-Lock: sha1:Qqey1wL5Q2t0D9bmWJfdMFld0iw= Xref: archiver1.google.com comp.lang.ada:26774 Date: 2002-06-28T22:34:09+00:00 List-Id: Stephen Leake writes: >> -O3 can only make executables larger, same with inlining, so this is >> not a good idea! > > I believe I have seen programs where the combination of -O3 with > inlining made things smaller. If there's a platform on which GNAT supports subprogram-level linking (I don't know if such a platform does exist), this could indeed happen. Without it, it's hardly believable, because the non-inlined copy will be pulled in in almost all cases. IIRC, C++ code which uses templates heavily benefits from inlining also in terms of code size, but the GNAT implementation of generics is so different that this effect cannot show up.