comp.lang.ada
 help / color / mirror / Atom feed
From: Markus Kuhn <Markus.Kuhn@cl.cam.ac.uk>
Subject: Re: Performance Ada and C
Date: 1998/07/03
Date: 1998-07-03T00:00:00+00:00	[thread overview]
Message-ID: <359CB19D.EDAD6D1F@cl.cam.ac.uk> (raw)
In-Reply-To: 6nh762$66i@netline.jpl.nasa.gov


Van Snyder wrote:
> Bolek Szymanski (http://www.cs.rpi.edu/szymansk) has noticed substantial
> performance differences between C and Fortran, and even more substantial
> differences between C++ and Fortran, at least in plasma particle-in-cell
> simulation codes.  The reason that Fortran is usually faster than C is
> the reason that Ada ought to be faster:  Pointers in Fortran are more
> disciplined -- no pointer arithmetic, and non-pointer thing-o's must have
> the TARGET attribute to get a pointer landing on them. Barbara Ryder, from
> AT&T Bell Labs (I don't know what fragment she's in now, if any) has shown
> that pointer optimization in C is NP-hard, while pointer optimization in
> Fortran and Ada is "only" polynomially hard.

I wonder whether GNAT (using a backend that was originally designed
specifically for C) can make much use of this theoretically better
optimizeability of Ada. Do you know of any performance comparisons
between GNAT and another Ada95 compilers that uses a code generator
that was right from the beginning designed for Ada?

I recently spent some time optimizing an Ada encryption routine
<http://www.cl.cam.ac.uk/~mgk25/download/serpent-ada.tar.gz>,
and while the best available C implementation
<http://www.cl.cam.ac.uk/ftp/users/rja14/serpent.tar.gz>
did 27 Mbit/s, I wasn't able to get with Ada more than
20 Mbit/s on the same processor (Pentium II, 300 MHz) using
the same compiler (gnat-3.10p).

> One of my colleagues reminded me of a study, for which neither of us
> could remember the author, that observed that 3 out of 4 C++ projects
> that are initiated are cancelled before completion.

Do you know a study that using comparable methodology tries to
determine such a number for both C++ and Ada95? Would be very
interesting ...

Markus

-- 
Markus G. Kuhn, Security Group, Computer Lab, Cambridge University, UK
email: mkuhn at acm.org,  home page: <http://www.cl.cam.ac.uk/~mgk25/>




  reply	other threads:[~1998-07-03  0:00 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <35921271.E51E36DF@aonix.fr>
     [not found] ` <3598358A.73FF35CC@pipeline.com>
     [not found]   ` <dewar.899298949@merv>
1998-07-03  0:00     ` Performance Ada and C, was Re: Size code Ada and C Van Snyder
1998-07-03  0:00       ` Markus Kuhn [this message]
1998-07-03  0:00         ` Performance " Robert Dewar
1998-07-03  0:00           ` Markus Kuhn
1998-07-04  0:00             ` ak
1998-07-07  0:00             ` Frank Klemm
1998-07-13  0:00               ` Daren Scot Wilson
     [not found] ` <m3zpf1tyr8.fsf@zaphod.enst.fr>
     [not found]   ` <6mtiv0$9j3@gcsin3.geccs.gecm.com>
     [not found]     ` <dewar.898962846@merv>
     [not found]       ` <6n7jut$al0$1@nnrp1.dejanews.com>
     [not found]         ` <6navqt$shc$1@goanna.cs.rmit.edu.au>
     [not found]           ` <359A53E2.41C6@lanl.gov>
     [not found]             ` <dewar.899334821@merv>
     [not found]               ` <6nfp0v$dgl@gcsin3.geccs.gecm.com>
1998-07-02  0:00                 ` Ariane 5 failure (Was: Size code Ada and C) Jean-Pierre Rosen
1998-07-03  0:00             ` robin
1998-07-02  0:00               ` William Clodius
1998-07-09  0:00             ` Plenty of unnecessary contraint tests " Frank Klemm
1998-07-09  0:00               ` Robert Dewar
1998-07-10  0:00                 ` Frank Klemm
1998-07-10  0:00               ` Ariane 5 failure " Dale Stanbrough
1998-07-10  0:00                 ` John McCabe
1998-07-10  0:00                   ` Frank Klemm
1998-07-10  0:00                   ` Pat Rogers
1998-07-10  0:00               ` Plenty of unnecessary contraint tests " Robert S. White
     [not found]       ` <6n8393$hoi$2@platane.wanadoo.fr>
     [not found]         ` <6n84im$79q@gcsin3.geccs.gecm.com>
     [not found]           ` <m3u35470ds.fsf@zaphod.enst.fr>
     [not found]             ` <6n8b7u$9hm@gcsin3.geccs.gecm.com>
     [not found]               ` <m3vhpk5f0d.fsf@zaphod.enst.fr>
     [not found]                 ` <3597db2d.1017430@news.demon.co.uk>
     [not found]                   ` <EACHUS.98Jun30173656@spectre.mitre.org>
1998-07-03  0:00                     ` Size code Ada and C John McCabe
1998-07-03  0:00                       ` Larry Elmore
1998-07-03  0:00                         ` John McCabe
1998-07-07  0:00                         ` Robert I. Eachus
     [not found]         ` <dewar.899298821@merv>
1998-07-07  0:00           ` Robert I. Eachus
replies disabled

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