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=0.7 required=5.0 tests=BAYES_00,INVALID_DATE, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Xref: utzoo comp.lang.c:26890 comp.software-eng:3188 comp.lang.ada:3450 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!elroy.jpl.nasa.gov!ames!amdcad!nucleus!tim From: tim@nucleus.amd.com (Tim Olson) Newsgroups: comp.lang.c,comp.software-eng,comp.lang.ada Subject: Re: Ada speed vs. C... Message-ID: <29483@amdcad.AMD.COM> Date: 13 Mar 90 17:31:39 GMT References: <8347@hubcap.clemson.edu> Sender: news@amdcad.AMD.COM Reply-To: tim@amd.com (Tim Olson) Organization: Advanced Micro Devices, Inc., Austin, Texas Summary: Expires: Sender: Followup-To: List-Id: In article <8347@hubcap.clemson.edu> wtwolfe@hubcap.clemson.edu (Bill Wolfe) writes: | | In response to recent requests for comparisons of the speed of | the code generated by Ada compilers vs. C compilers, the following | results were originally described at the Tri-Ada '88 conference | in Charleston, WV on October 26, 1988: | | -------------------------------------------------------------------------- | Among the C compilers chosen were those that produced the best times on | 16.77 Mhz 68020 based machines out of a list of published dhrystone results | for 300 compilers. The TeleSoft TeleGen2 optimizing compiler was compared | against four other C compilers: | | Sun/Unix 3.2 C on a Sun 3/160 | GreenHills C on ISI optimum V machine | Gnu C on a Sun 3/160 | MASSCOMP C on RTU 3.1, NC-5700 machine | | MASSCOMP had the best C compiler, our Ada compiler only beat it by a very | small margin. Dhrystone should not be used to compare the performance of Ada compilers vs. C compilers. It over-emphasizes string operations, which ends up penalizing C with its implementation of null-terminated strings. Many compiler/machine combinations spend ~30% of their time in strcpy() when running this benchmark! Most real programs don't use the string routines nearly as much as Dhrystone, so the performance difference between Ada and C on this benchmark doesn't reflect real-world results. I'm not saying that Ada is necessarily slower than C on non-string-intensive code, but the performance of a number of different benchmarks should be compared to ensure that you aren't seeing an anomaly or artifact of a particular benchmark. -- Tim Olson Advanced Micro Devices (tim@amd.com)