From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, FREEMAIL_REPLY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f51e93dacd9c7fca X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-06-18 15:36:32 PST From: Vinzent Hoefler Newsgroups: comp.lang.ada Subject: Re: status of Ada STL? Date: Wed, 19 Jun 2002 00:36:20 +0200 Organization: JeLlyFish software References: <3d0ce154_5@news.bluewin.ch> <3d0e574d_2@news.bluewin.ch> X-Newsreader: Forte Agent 1.8/32.548 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 62.202.192.252 Message-ID: <3d0fb5e8$1_3@news.bluewin.ch> X-Trace: news.bluewin.ch 1024439784 62.202.192.252 (19 Jun 2002 00:36:24 +0200) X-Complaints-To: abuse@bluewin.ch Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-han1.dfn.de!news-stu1.dfn.de!news.belwue.de!news.tesion.net!newsfeed-zh.ip-plus.net!news.ip-plus.net!news.bluewin.ch!not-for-mail Xref: archiver1.google.com comp.lang.ada:26314 Date: 2002-06-19T00:36:20+02:00 List-Id: Robert A Duff wrote: >> 18k11tm001@sneakemail.com (Russ) wrote: >> >Every good C++ programmer knows that "+=" is much more efficient than >> >"+" for vector/matrix addition because it eliminates the need for >> >constructing a temporary matrix to hold the sum. [...] >I think Russ is right here. > >X := F(X, Y); > >is *not* equivalent to the code that overwrites X in place, >in the general case. In the usual case, where the called function >is not inlined, and the compiler doesn't look at its body, >the compiler has no hope of doing this optimization. >Even if it's inlined, the proof is not trivial. Hmm, well. Seems I did not take a closer look on what operator overloading can do. I still thought of simple C. :( Anyway, I could declare F (X : inout ...; Y); then, to do the assignment for me. ;-) Vinzent.