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-10 16:26:12 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!arclight.uoregon.edu!wn13feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi.com!sccrnsc03.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: sccrnsc03 1055287572 12.234.13.56 (Tue, 10 Jun 2003 23:26:12 GMT) NNTP-Posting-Date: Tue, 10 Jun 2003 23:26:12 GMT Organization: AT&T Broadband Date: Tue, 10 Jun 2003 23:26:12 GMT Xref: archiver1.google.com comp.lang.ada:38940 Date: 2003-06-10T23:26:12+00:00 List-Id: Hyman Rosen said: > > how fast do they execute 10**7 times on 3x3 matrices of zeros? > for (i = 0; i < 100000000; ++i) A = A + B; >Program output (times are in seconds): >+ 8 >+= 5 That's for 10**8, so 0.8 and 0.5 are the numbers for 10**7, right? Those numbers are notably faster than your earlier 1.1, 0.7 - is it the same machine, different compiler, or different machine, or improved code, or what? Ole Kristensen said: > Same compiler, old 266MHz PII: > + 24 > += 10 I assume that's also for 10**8 iterations, so 2.4 and 1.0 are the 1E7 numbers? If that machine is 1/3 the speed of an 866MHz PIII, that suggests the compiler makes a big difference (or perhaps the compiler's optimizations). Returning to the original point, about the relative speed of + with a (presumed) temporary vs +=, we seem to have a range of ratios of 1.3 .. 2.9, with 1.6 being a commonly occurring value.