comp.lang.ada
 help / color / mirror / Atom feed
From: tim@nucleus.amd.com (Tim Olson)
Subject: Re: Ada speed vs. C...
Date: 13 Mar 90 17:31:39 GMT	[thread overview]
Message-ID: <29483@amdcad.AMD.COM> (raw)
In-Reply-To: 8347@hubcap.clemson.edu

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)

  parent reply	other threads:[~1990-03-13 17:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1990-03-12 23:09 Ada speed vs. C Bill Wolfe
1990-03-13 16:45 ` Richard A Hammond
1990-03-13 17:54   ` William Thomas Wolfe, 2847 
1990-03-13 17:31 ` Tim Olson [this message]
1990-03-14 18:11   ` David Kassover
1990-03-13 18:06 ` Mike Percy
1990-03-13 18:45   ` William Thomas Wolfe, 2847 
1990-03-13 19:56 ` Wayne Wood
1990-03-14 20:29 ` Vinod Grover
1990-03-14 20:58   ` Steve Tynor
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox