comp.lang.ada
 help / color / mirror / Atom feed
From: "Nick Roberts" <Nick.Roberts@dial.pipex.com>
Subject: Re: should I be interested in ada?
Date: 1999/02/19
Date: 1999-02-19T00:00:00+00:00	[thread overview]
Message-ID: <7akvan$j5t$1@plug.news.pipex.net> (raw)
In-Reply-To: 7ajrpu$jpq$1@nnrp1.dejanews.com

robert_dewar@my-dejanews.com wrote in message
<7ajrpu$jpq$1@nnrp1.dejanews.com>...
|> Does Ada enforce anti-aliasing rules regarding the global
|> variables?
|
|The anti-aliasing rules are in some respects weaker,
|although in other respects stronger (the stronger typing
|for example allows better aliasing information to be
|built). You can construct artificial examples which give
|a theoretical optimization advantage in either direction.
|How important this is in practice is anyone's guess.


However, I think there are ways in which an Ada compiler could 'get round'
the theoretical advantage that Fortran has (see my other post).

[...]
|However, other aggregate operations in Fortran that imply
|parallelism may not be so easy to model in Ada.


Certainly true, in terms of source text, there are some Fortran constructs
which are not so readily witten in Ada. For example (a simple one!):

   x(1:3,:,1:5) = y(:)

might have to be written in Ada as:

   for i in 1..3 loop
      for j in X'Range(2) loop
         for k in 1..5 loop
            X(i,j,k) := Y(j);
         end loop;
      end loop;
   end loop;

Not nearly so neat or convenient (but, nevertheless, not impractical).

However, an optimising Ada compiler targetting, say, a SIMD machine, would
still be able to vectorise the assignment. This is an 'obvious'
optimisation. For any target, there's no reason why it couldn't produce code
just as good as for the Fortran equivalent.

|> I really am simply courious.  I see many things in Ada
|> which. I find attractive and I want to know about the
|> optimization issues.
|
|Nick proposed that "the high level language is
|theoretically compltely immaterial [to the optimization
|issue]", and that of course is completely wrong.
|
|It is definitely the case that there are various
|theoretical differences, but as always, the difficulty
|with any optimization issues is knowing how much
|difference it will make in practice, and that is
|hard to know. Usually such theoretical differences
|are swamped by other engineering issues, i.e. "other
|things being equal" is a condition that is not  in
|practice easy to meet.


I should have avoided generalising to 'high level languages'. I don't
believe there is any _theoretical_ difference between Fortran 90 and Ada 95,
as regards optimisation. I agree entirely that _are_ differences, in
practice.

Can anyone provide an example (which isn't totally unrealistic?) which shows
an unavoidable optimisation advantage of one language over another?

-------------------------------------
Nick Roberts
-------------------------------------







  parent reply	other threads:[~1999-02-19  0:00 UTC|newest]

Thread overview: 89+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-02-14  0:00 should I be interested in ada? Phillip Helbig
1999-02-15  0:00 ` Gautier
1999-02-15  0:00 ` Marin David Condic
1999-02-23  0:00   ` David Starner
1999-02-16  0:00 ` Ken Thomas
1999-02-17  0:00   ` Nick Roberts
1999-02-18  0:00     ` robert_dewar
1999-02-18  0:00       ` Nick Roberts
1999-02-18  0:00         ` robert_dewar
1999-02-19  0:00           ` Nick Roberts
1999-02-19  0:00             ` robert_dewar
1999-02-19  0:00               ` William Clodius
1999-02-19  0:00               ` Nick Roberts
1999-02-20  0:00                 ` robert_dewar
1999-02-20  0:00                   ` Steve Doiel
1999-02-20  0:00                 ` robert_dewar
1999-02-22  0:00                   ` dennison
1999-02-22  0:00                   ` Nick Roberts
1999-02-23  0:00                     ` Robert I. Eachus
1999-02-24  0:00                       ` White rabbit (was: should I be interested in ada?) dennison
1999-02-25  0:00                       ` Alice books " JP Thornley
1999-02-25  0:00                         ` Robert I. Eachus
1999-02-19  0:00               ` should I be interested in ada? Phillip Helbig
1999-02-19  0:00               ` dennison
1999-02-19  0:00                 ` robert_dewar
1999-02-19  0:00                 ` William Clodius
1999-02-19  0:00                 ` Nick Roberts
1999-02-20  0:00                   ` robert_dewar
1999-02-22  0:00                     ` Nick Roberts
1999-02-18  0:00         ` William Clodius
1999-02-18  0:00           ` robert_dewar
1999-02-19  0:00             ` William Clodius
1999-02-19  0:00               ` Nick Roberts
1999-02-20  0:00                 ` robert_dewar
1999-02-22  0:00                   ` Nick Roberts
1999-02-22  0:00                     ` William Clodius
1999-02-23  0:00                     ` robert_dewar
1999-02-23  0:00                       ` Nick Roberts
1999-02-22  0:00                 ` William Clodius
1999-02-23  0:00                   ` Nick Roberts
1999-02-23  0:00                     ` William Clodius
1999-02-25  0:00                       ` Nick Roberts
1999-02-25  0:00                         ` robert_dewar
1999-02-23  0:00               ` Robert I. Eachus
1999-02-24  0:00                 ` William Clodius
1999-02-24  0:00                 ` Nick Roberts
1999-02-26  0:00                   ` Robert A Duff
1999-02-27  0:00                     ` Semantic info pragmas (was: should I be interested in ada?) Nick Roberts
1999-03-01  0:00                       ` Samuel Tardieu
1999-03-01  0:00                         ` Robert A Duff
1999-02-24  0:00               ` should I be interested in ada? William Clodius
1999-02-25  0:00                 ` Nick Roberts
1999-02-25  0:00                   ` robert_dewar
1999-02-26  0:00                     ` Nick Roberts
1999-02-18  0:00           ` nabbasi
1999-02-18  0:00             ` robert_dewar
1999-02-18  0:00         ` Jerry Petrey
1999-02-18  0:00           ` fraser
1999-02-19  0:00             ` Matthew Heaney
1999-02-20  0:00               ` fraser
1999-02-18  0:00           ` Nick Roberts
1999-02-18  0:00             ` Dan Nagle
1999-02-18  0:00               ` nabbasi
1999-02-19  0:00               ` Nick Roberts
1999-02-19  0:00                 ` Dan Nagle
1999-02-19  0:00                   ` robert_dewar
1999-02-19  0:00                     ` Dan Nagle
1999-02-19  0:00                     ` Nick Roberts [this message]
1999-02-23  0:00                     ` Peter Hermann
1999-02-19  0:00                 ` robert_dewar
1999-02-19  0:00                   ` Nick Roberts
1999-02-19  0:00                     ` robert_dewar
1999-02-21  0:00                       ` William Clodius
1999-02-23  0:00                         ` Robert I. Eachus
1999-02-19  0:00                     ` William Clodius
1999-02-20  0:00                       ` Nick Roberts
1999-02-21  0:00                         ` robert_dewar
1999-02-21  0:00                           ` William Clodius
1999-02-22  0:00                           ` Nick Roberts
1999-02-18  0:00             ` Joel Seidman
1999-02-18  0:00     ` robert_dewar
1999-02-18  0:00       ` Nick Roberts
1999-02-18  0:00         ` William Clodius
1999-02-18  0:00           ` dennison
1999-02-20  0:00 ` Hartmut H. Schaefer
1999-02-20  0:00   ` bill
1999-02-21  0:00     ` dewar
1999-02-21  0:00   ` dewar
1999-02-22  0:00     ` dennison
replies disabled

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