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,5a97e6705e234408 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-09-18 17:04:45 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!feed2.news.rcn.net!rcn!chnws02.mediaone.net!chnws06.ne.mediaone.net!24.128.8.70!typhoon.ne.mediaone.net.POSTED!not-for-mail From: "Jeff Creem" Newsgroups: comp.lang.ada References: <8f23da36.0109181403.52128d70@posting.google.com> Subject: Re: Expected bytes per sloc (semicolons) performance X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 Message-ID: <_hRp7.7630$ot.1153235@typhoon.ne.mediaone.net> Date: Wed, 19 Sep 2001 00:04:10 GMT NNTP-Posting-Host: 24.147.117.96 X-Complaints-To: abuse@mediaone.net X-Trace: typhoon.ne.mediaone.net 1000857850 24.147.117.96 (Tue, 18 Sep 2001 20:04:10 EDT) NNTP-Posting-Date: Tue, 18 Sep 2001 20:04:10 EDT Organization: Road Runner Xref: archiver1.google.com comp.lang.ada:13169 Date: 2001-09-19T00:04:10+00:00 List-Id: This is one of those questions that comes up from time to time for which I do not think there is a great answer. First to start off always be sure you are looking at just the resulting text segment (or perhaps text, data and const sections of the file) and not symbol table/debug data. Also be sure to at least know if you are including some run time overhead that is not impacted by the # of SLOC. Now once you do this there is still the issue that code that looks like: Some_Var := A ** 2 + B + C + D + E ; will end up with very different results than code that looks like: Some_Var := A ** 2; Some_Var := Some_Var + B; Some_Var := Some_Var + C; . . . And if one includes things like the constants segment or initialized data segment then of course all sorts of fun things crop up like the difference between a : constant Some_Array(1 .. 10) := 0; and a : constant Some_Array(1 .. 100000) := 0; (Ok boring constants like this are a bad example but you get the point). The best one can hope for is some rough estimates for your code that perhaps holds up over some reasonable extrapolation as long as everyone writes code in the same style. As for RISC/CISC.... One sometimes ends up with slightly larger code on a RISC than CISC machine but this probably has almost as much to do with mandatory nops, missed delayed branch opportunities and alignment requirements as it does with the straight RISC/CISC issues. One final point once you cross out of the target/compiler issues to lang/target issues. One should take into account the power of the language in trying to make a comparison. One could find that (totally hypothetical here) something like FORTRAN ends up with half of bytes per LOC as C++ but perhaps C++ is more expressive and can perform the same functionality in 1/3 of the lines of code. "Mike Harrison" wrote in message news:8f23da36.0109181403.52128d70@posting.google.com... > Hello group, > > Using AdaMulti with a Sun/SPARC target I am seeing an average of 60 bytes > per semicolon on a 5K project. > > Has anyone had a similar experience? > Is this approximately what you should expect from an Ada compiler > outputting to a RISC computer? > If we moved from RISC to CISC would there be any difference? > If we moved to GNAT would there be an improvement? > Are there any resources out there with compiler/language/bytes-per-sloc info? > > Thanks in advance. > Mike