🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

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

#2202
From: Alex Martelli
Date: Sun, 15 Oct 1995 14:39
32 lines
2120 bytes
kanze@gabi-soft.fr (J. Kanze) writes:
	...
>Fortran basically says that the results are undefined if aliasing is
>present, C/C++ doesn't.  (In this regard, one could very easily argue
>that C/C++ is safer.  In fact *in* *this* *regard*, I think it is, in
>that you get defined results even if the arrays overlap.)

Agreed, from practical experience; this _was_ an occasional cause of
very obscure bugs when we used to code in Fortran, as even very
experienced Fortran practitioners were all but clear on the no-alias
rule of that language... I remember people used to disable optimization
(thus often hiding the alias-related bug) and thought they had just hit
"one more optimizer bug"!-).


>I don't know what the current stand is with regards to the proposed C
>extensions, and their incorporation into C++.  The C standard is part of
>C++ `by reference', but in fact, I think that this is only where there

By _const_ reference, surely?-)


Alex
--
DISCLAIMER: these are TOTALLY personal opinions and viewpoints, NOT connected
in any way with my employer, nor any other organization or individual!
Email: martelli@cadlab.it                            Phone: +39 (51) 597313
CAD.LAB s.p.a., v. Ronzani 7/29, Casalecchio, Italia   Fax: +39 (51) 597120

[ 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: <martelli.813750783@cadlab>
Path: arc1-ca.pugleaf.net!engnews2.Eng.Sun.COM!taumet!clamage
References: <45ld1i$m7i@cicg-communication.grenet.fr> <45o2n2$o48@gabi.gabi-soft.fr>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!engnews2.Eng.Sun.COM!taumet!clamage
From: martelli@cadlab.cadlab.it (Alex Martelli)
Newsgroups: comp.std.c++
Subject: Re: F90 vs C++/C, optimization question?
Date: 15 Oct 1995 14:39:15 GMT
Organization: Cad.Lab Spa, Bologna, Italia
Sender: nntpnews@cadlab.it (NNTP Posting Services)
Approved: clamage@eng.sun.com (comp.std.c++)
Message-ID: <martelli.813750783@cadlab>
References: <45ld1i$m7i@cicg-communication.grenet.fr> <45o2n2$o48@gabi.gabi-soft.fr>
NNTP-Posting-Host: taumet.eng.sun.com
Content-Type: text
X-Newsreader: NN version 6.5.0 #11
Content-Length: 1253
Originator: clamage@taumet