TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Dirk Craeynest <[log in to unmask]>
Reply To:
Dirk Craeynest <[log in to unmask]>
Date:
Wed, 8 Jan 1997 12:48:12 MET
Content-Type:
text/plain
Parts/Attachments:
text/plain (41 lines)
Path: cfmu!news.eurocontrol.be!Belgium.EU.net!EU.net!howland.erols.net!worldnet.att.net!news.mathworks.com!uunet!in1.uu.net!205.238.207.65!ivan.iecc.com!ivan.iecc.com!not-for-mail
From: Arch Robison <[log in to unmask]>
Newsgroups: comp.compilers
Subject: Ada vs. C performance, was Possible to write compiler to Java VM?
Date: 7 Jan 1997 12:31:07 -0500
Organization: Kuck & Associates, Inc.
Lines: 27
Sender: [log in to unmask]
Approved: [log in to unmask]
Message-ID: <[log in to unmask]>
NNTP-Posting-Host: ivan.iecc.com
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.
[log in to unmask]                         1906 Fox Drive
217-356-2288                            Champaign IL 61820
--
Send compilers articles to [log in to unmask],
meta-mail to [log in to unmask]

ATOM RSS1 RSS2