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-04 07:22:33 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!logbridge.uoregon.edu!newsfeed.vmunix.org!uio.no!193.216.69.35.MISMATCH!dax.net!juliett.dax.net!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Ideas for Ada 200X References: <7vu1b640gf.fsf@vlinux.voxelvision.no> From: Ole-Hjalmar Kristensen Message-ID: <7vllwh53ei.fsf@vlinux.voxelvision.no> User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 04 Jun 2003 14:21:57 GMT NNTP-Posting-Host: 193.216.12.150 X-Complaints-To: abuse@tele2.no X-Trace: juliett.dax.net 1054736517 193.216.12.150 (Wed, 04 Jun 2003 16:21:57 MET DST) NNTP-Posting-Date: Wed, 04 Jun 2003 16:21:57 MET DST Organization: Tele2 Norway AS Public Access Xref: archiver1.google.com comp.lang.ada:38603 Date: 2003-06-04T14:21:57+00:00 List-Id: Bill Findlay writes: > On 4/6/03 11:10, in article 7vu1b640gf.fsf@vlinux.voxelvision.no, > "Ole-Hjalmar Kristensen" wrote: > > > I think the difference between C++ and Ada is the compiler. I run both > > through gcc, and got identical results. > > They are far from identical, AFAICS. > You show the Ada code as being 10 times faster, at 0.200s user-mode CPU time > for C++ matrix_c, 0.030s for Ada matrix_fun, and 0.010s for matrix_proc : > > > $ gnatmake -s -gnatp -O3 -funroll-loops matrix_fun > > $ gnatmake -s -gnatp -O3 -funroll-loops matrix_proc > > g++ -O3 -funroll-loops -o matrix_c matrix_c.cpp > > > > $ time matrix_c > > user 0m0.200s > > > $ time matrix_proc > > user 0m0.010s > > > $ time matrix_fun > > user 0m0.030s > > -- > Bill-Findlay chez blue-yonder.co.uk ("-" => "") > > Well, yes, but the clock time is the same. It's an otherwise unloaded system, and I get repeatable results, so I suspect there's something funny going on with the user time measurements. Besides, a user time of 0.01 seconds would indicate 10**10 additions per second, and I don't believe my computer is quite as fast as that. -- Ole-Hj. Kristensen ****************************************************************************** * You cannot consistently believe this sentence. ******************************************************************************