comp.lang.ada
 help / color / mirror / Atom feed
From: clodius@hotspec.lanl.gov (William Clodius)
Subject: Re: Concerning subscript bounds checks
Date: 1996/06/24
Date: 1996-06-24T00:00:00+00:00	[thread overview]
Message-ID: <g1hgs1p7uy.fsf@hotspec.lanl.gov> (raw)
In-Reply-To: dewar.835402601@schonberg


In article <4ql9eq$hdt@goanna.cs.rmit.EDU.AU> ok@goanna.cs.rmit.EDU.AU
(Richard A. O'Keefe) writes:

   From: ok@goanna.cs.rmit.EDU.AU (Richard A. O'Keefe)
   Keywords: subscripts
   Newsgroups: comp.lang.ada,comp.lang.misc
   Date: 24 Jun 1996 15:35:22 +1000
   Organization: Comp Sci, RMIT, Melbourne, Australia
   Path: newshost.lanl.gov!ncar!gatech!swrinde!ihnp4.ucsd.edu!munnari.OZ.AU!news.mel.connect.com.au!news.mira.net.au!harbinger.cc.monash.edu.au!news.rmit.EDU.AU!goanna.cs.rmit.EDU.AU!not-for-mail
   Lines: 60
   References: <4qdj3e$btf@goanna.cs.rmit.EDU.AU> <dewar.835402601@schonberg>
   NNTP-Posting-Host: goanna.cs.rmit.edu.au
   NNTP-Posting-User: ok
   X-Newsreader: NN version 6.5.0 #0 (NOV)
   Xref: newshost.lanl.gov comp.lang.ada:13943 comp.lang.misc:25665

   The central point I was making was a very simple, very obvious, very
   positive one:

       I translated an algorithm from Fortran to Ada,
       and it _easily_ and _naturally_ fell out that
       62 out of 66 subscripts could _obviously_ be
       compiled without checks using purely local
       information (no data flow or range analysis needed).

   I call that a _good_ result.  (The 4 subscripts that aren't quite so
   obvious are executed with low frequency, and only the upper bound is
   not obviously safe.)

But the comparison is not complete as it is done only one way.  I
remember reading somewhere that in the 80s an experimental F77 compiler
was written that could optimize away 90% of all array bounds checks on
a large variety of codes when array bounds checking was turned on.  (I
don't know if this capability was ever implemented in a commercial
Fortran compiler, but then it hasn't been implemented in the obvious
Ada 95 compiler.)  Did you check to see what an equivalent algorithm
would do on the original F77 code?  How would it do if rewritten in
F90 stle?



-- 

William B. Clodius		Phone: (505)-665-9370
Los Alamos National Laboratory	Email: wclodius@lanl.gov
Los Alamos, NM 87545




  reply	other threads:[~1996-06-24  0:00 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-06-21  0:00 Concerning subscript bounds checks Richard A. O'Keefe
1996-06-21  0:00 ` Robert Dewar
1996-06-24  0:00   ` William Clodius [this message]
1996-06-27  0:00     ` Richard A. O'Keefe
1996-06-28  0:00       ` Ken Thomas
1996-06-24  0:00   ` Richard A. O'Keefe
1996-06-24  0:00     ` Robert Dewar
1996-06-28  0:00     ` joeuser
1996-06-28  0:00       ` Adam Beneschan
1996-07-01  0:00       ` Richard A. O'Keefe
1996-07-01  0:00         ` Robert A Duff
1996-07-02  0:00           ` Richard A. O'Keefe
1996-06-24  0:00   ` Adam Beneschan
1996-06-25  0:00 ` ++           robin
1996-06-27  0:00   ` Richard A. O'Keefe
1996-06-25  0:00 ` William Clodius
replies disabled

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