🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #2229

Re: F90 vs C++/C, optimization question?

#2229
From: Helmut Jarausch
Date: Tue, 17 Oct 1995 13:04
31 lines
2177 bytes
[Moderator's note: I deleted about 50 lines of quoted material
from this article. -fjh.]

bill@amber.ssd.hcsc.com (Bill Leonard) writes:
[...]
> IMHO, the best answer is improved interprocedural analysis by compilers,
> because that is the safest and also the most optimal -- it detects aliasing
> when it is present, and detects lack of aliasing when it is absent (even if
> the programmer didn't know whether aliasing was present or not).

This is all true, BUT there are and will ever be situations where it is
impossible for a machine to figure out if there is aliasing or not.
I remember a case where I had to tell the CRAY FORTRAN compiler (via
a special comment) to vectorize a loop. It took me and a collegue of
mine nearly an hour to prove that there is no aliasing. But on the other
hand it was crucial to get full speed in that loop.

If it is impossible or hard to get good performance with C++ it will
die out in the scientific computing world, just because there are very
few things missing.  If you are afraid, you can let the compiler print
tons of warnings whenever such a construct is used. But there is need
for a PORTABLE construct and not just a vendor specific #pragma.

Helmut Jarausch
Institute of Technology
RWTH Aachen
Germany
---
[ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy
  is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Technical Details
Message-ID: <45vvt5$7k3@news.rwth-aachen.de>
Path: arc1-ca.pugleaf.net!in1.uu.net!bounce-back
References: <45ld1i$m7i@cicg-communication.grenet.fr> <45o2n2$o48@gabi.gabi-soft.fr> <45tq00$dkd@hawk.hcsc.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!in1.uu.net!bounce-back
Date: 17 Oct 95 13:04:20 GMT
Approved: fjh@cs.mu.oz.au
From: jarausch@igpm.rwth-aachen.de (Helmut Jarausch)
Newsgroups: comp.std.c++
Subject: Re: F90 vs C++/C, optimization question?
X-Original-Date: 17 Oct 1995 10:18:13 GMT
Organization: RWTH Aachen (Inst. f. Geometrie & Prakt. Mathematik)
Message-ID: <45vvt5$7k3@news.rwth-aachen.de>
References: <45ld1i$m7i@cicg-communication.grenet.fr> <45o2n2$o48@gabi.gabi-soft.fr> <45tq00$dkd@hawk.hcsc.com>
X-Newsreader: xrn 7.00 (Motif)
X-Auth: PGPMoose V1.1 PGP comp.std.c++
 iQBFAgUBMIOrcuEDnX0m9pzZAQEs6QGAke8mS16ldlKgQ2MRaWgquy81aBrYrCP0
 W6sdW7BKLeYyas5cYcT3Qb67SfRnSSID
 =GJ6k