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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,38fc011071df5a27 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-06-06 23:32:03 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!nntp-server.caltech.edu!attla2!ip.att.net!attbi_feed3!attbi.com!sccrnsc01.POSTED!not-for-mail From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: Ideas for Ada 200X References: X-Newsreader: Tom's custom newsreader Message-ID: NNTP-Posting-Host: 12.234.13.56 X-Complaints-To: abuse@attbi.com X-Trace: sccrnsc01 1054967522 12.234.13.56 (Sat, 07 Jun 2003 06:32:02 GMT) NNTP-Posting-Date: Sat, 07 Jun 2003 06:32:02 GMT Organization: AT&T Broadband Date: Sat, 07 Jun 2003 06:32:02 GMT Xref: archiver1.google.com comp.lang.ada:38780 Date: 2003-06-07T06:32:02+00:00 List-Id: >Compare > > A := B + C + D > >with > > A := B > A += C > A += D A good Ada programmer would first write a function "+"(Left,Right:Matrices) and write A := B + C + D and make sure his algorithm worked. If he then found there were performance problems, and they were in that part of his code, he would then try implementing > A := B > A += C > A += D [though he would write it as A := B; Add(A, C); Add(A, D);] and he would see if that made a worthwhile speedup. If there were still problems, he could try for row in A'range(1) loop for col in A'range(2) loop A(row,col) := B(row,col) + C(row,col) + D(row,col); end loop; end loop; or he could try using special hardware vector instructions, each time running timing tests to see whether the new code was indeed usefully faster.