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-Thread: 103376,91d0d8cd28bbb477 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!fu-berlin.de!nuzba.szn.dk!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Implementing an Ada compiler and libraries. Date: Wed, 16 May 2007 14:58:45 -0500 Organization: Jacob's private Usenet server Message-ID: References: <1178721451.073700.10730@y80g2000hsf.googlegroups.com> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: jacob-sparre.dk 1179345404 31864 69.95.181.76 (16 May 2007 19:56:44 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Wed, 16 May 2007 19:56:44 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1807 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1807 Xref: g2news1.google.com comp.lang.ada:15817 Date: 2007-05-16T14:58:45-05:00 List-Id: "Robert A Duff" wrote in message news:wccfy65n2pq.fsf@shell01.TheWorld.com... ... > If you do this, you need to design a permanent (on disk) representation > that is small. I think it's possible, but it's not easy -- the > "obvious" representation of symbol tables will be 10 times larger than > the source code. If it's 10 times larger, then it defeats the purpose > -- reading it in from disk will be slower than re-analyzing the original > source code. I don't quite buy this. "10 times larger" seems to be a gross overestimate (for Janus/Ada, it tends to be more like 2-3 times, and we did little to make the disk files smaller -- they're not the limited factor for compilation speed). It's necessary to keep the symbol table memory use reasonable (else paging costs will eat you up), and directly translating that to disk files is straightforward. Also, the cost of reading files vs. reparsing depends very much on how much effort is encoded in the files. Reading text is slower than known size binary files to begin with (although on modern machines, the difference isn't that significant), and there is a lot of other work that needs to go on to analyze a source file. My experience is that Janus/Ada is faster than Gnat on most compilations (although the difference isn't really significant, except on very large files where Gnat is faster because the Janus/Ada optimizer is worse than quadratic in program size). Randy.