Ada vs. C performance, was Possible to write compiler to Java VM?

Arch Robison <robison@kai.com>
7 Jan 1997 12:31:07 -0500

          From comp.compilers

Related articles
Ada vs. C performance, was Possible to write compiler to Java VM? robison@kai.com (Arch Robison) (1997-01-07)
Ada and C baw@cise.npl.co.uk (Brian A Wichmann) (1997-01-09)
Re: Ada vs. C performance, was Possible to write compiler to Java VM? Laurent.Guerby@enst-bretagne.fr (Laurent Guerby) (1997-01-09)
Re: Ada vs. C performance, was Possible to write compiler to Dave_Koogler_at_CCISDAPPS1@ppc-191.putnaminv.com (1997-01-09)
Ada vs. C performance, was Possible to write compiler to Java VM? rgh@shellus.com (1997-01-09)
Re: Ada vs. C performance, was Possible to write compiler to burley@gnu.ai.mit.edu (Craig Burley) (1997-01-12)
Re: Ada vs. C performance, was Possible to write compiler to Java VM? ronald.ten-hove@itron.com (Ron Ten-Hove) (1997-01-12)
[4 later articles]
| List of all articles for this month |

From: Arch Robison <robison@kai.com>
Newsgroups: comp.compilers
Date: 7 Jan 1997 12:31:07 -0500
Organization: Kuck & Associates, Inc.
Keywords: Ada, C, performance

>[Do Ada compilers really generate better code than C compilers for similar
>source code? -John]


I have one anecdotal data point that says no. While working for my
former employer, I was asked to investigate why a new piece of
software written in Ada was so much slower than its old counterpart in
Fortran. The presumed reason was "new feature and flexibility bloat".
But profiling indicated the problem was really with some basic
old-fashioned numerical inner loops. Not being strong on Fortran, I
rewrote the loops in C for comparison. The C was at least 2x faster.
Inspection of the assembly code indicated that the Ada compiler was
lacking fundamental optimizations present in the C compiler.


This is of course a single data point, probably obsolete. But I think
there is a strong reason to suspect that C compilers will generally
generate better code than Ada compilers. Quality of code is
ultimately not a technology issue; it is an economics issue.
Optimizers (and the rest of compilers) are as good as what people are
willing to pay for, and the C market is much bigger. (Data points to
the contrary cheerfully accepted!)


Arch D. Robison Kuck & Associates Inc.
robison@kai.com 1906 Fox Drive
217-356-2288 Champaign IL 61820
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.