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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,6575b47ba54cee7c X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!e23g2000prf.googlegroups.com!not-for-mail From: Hibou57 Newsgroups: comp.lang.ada Subject: Re: Reducing the size of executables produced by GNAT Date: Mon, 18 Feb 2008 16:41:44 -0800 (PST) Organization: http://groups.google.com Message-ID: References: <40e9c01a-8d31-4554-9d9b-18cce7834d56@s12g2000prg.googlegroups.com> <47b300d3$1@news.post.ch> <9c0a949b-ce82-4eda-99c9-02aace675266@d21g2000prf.googlegroups.com> <47b360b1$1_4@news.bluewin.ch> <3ff060f5-673b-4011-a0d1-1692d6e6f105@e10g2000prf.googlegroups.com> NNTP-Posting-Host: 86.75.149.95 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1203381704 2714 127.0.0.1 (19 Feb 2008 00:41:44 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 19 Feb 2008 00:41:44 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: e23g2000prf.googlegroups.com; posting-host=86.75.149.95; posting-account=vrfdLAoAAAAauX_3XwyXEwXCWN3A1l8D User-Agent: G2/1.0 X-HTTP-UserAgent: Opera/9.23 (Windows NT 5.1; U; fr),gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:19880 Date: 2008-02-18T16:41:44-08:00 List-Id: Well, well, I've finally managed to custom a runtime with GNAT for Windows. The big stuff was with the exception runtime. It appears that I could go from 43KB down to 25KB, when removing traceback and exception information functionalities. So those two sole functionalities weight near to 20KB. I was a bit surprised, but in the mean time, I was seeing that the elaboration of the involved package does not cost a lot of execution at start up. I was to go further, but stop there, beceause the conclusion I went to at this point was suffiscient to tell me that this is unusefull to go further. The conclusion is : there is a weight for some functionalities which may indeed be unused, but the elaboration cost at application start up is low. So the size of 45KB for a very simple application does not means there is an expensive overhead. More from this conclusion : the risk coming with numerous modifications of the runtime code is too hight compare to the advantage one may get with these modifications. Thus, I prefer to let the runtime as-is, as stable as it is, beceause there is not enough benefits to modify it. I still recognize that the code could be lighter, but GNAT is GNAT, and it is dedicated to serve in the area of big applications, and requirements in this area make some design choice of GNAT rather obvious. GNAT is definitely not well suited for small applications, but GNAT is still a good Ada compiler and is well suited for application with which ones size is not a matter. GNAT is good enough for little application as soon the incompressible size of the runtime is not a matter, in the sense that the elaboration of the runtime is does not cost so much. I still recognize then that an Ada compiler producing smaller code will be welcome, but this will require services apart of GNAT. That's all of my conclusions after managed to setup a lighter runtime : this is unusefull to persist in this way, and there are more profits to not to touch it than to reduce it. Have a nice day, Yannick