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: 1014db,304c86061dc69dba X-Google-Attributes: gid1014db,public X-Google-Thread: 109fba,304c86061dc69dba X-Google-Attributes: gid109fba,public X-Google-Thread: 1094ba,2746b4897cd9baa7,start X-Google-Attributes: gid1094ba,public X-Google-Thread: 103376,5cb36983754f64da X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-02-12 15:20:04 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: msg_1825@yahoo.com (MSG) Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++,comp.lang.fortran Subject: Ada performance (was No call for Ada ) Date: 12 Feb 2004 15:20:04 -0800 Organization: http://groups.google.com Message-ID: <88dc613b.0402121520.bf939f8@posting.google.com> References: <20040206174017.7E84F4C4114@lovelace.ada-france.org> <54759e7e.0402071124.322ea376@posting.google.com> <2460735.u7KiuvdgQP@linux1.krischik.com> <54759e7e.0402081525.50c7adae@posting.google.com> <54759e7e.0402091826.2847e0c@posting.google.com> <54759e7e.0402101819.95cec1d@posting.google.com> NNTP-Posting-Host: 156.111.84.180 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1076628004 13482 127.0.0.1 (12 Feb 2004 23:20:04 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 12 Feb 2004 23:20:04 +0000 (UTC) Xref: archiver1.google.com comp.lang.ada:5501 comp.lang.c:22181 comp.lang.c++:18948 comp.lang.fortran:4919 Date: 2004-02-12T15:20:04-08:00 List-Id: James Rogers wrote in message news:... > msg1825@yahoo.com (MSG) wrote in > news:54759e7e.0402101819.95cec1d@posting.google.com: > > > Can you write (*) a matrix multiplication routine in Ada, compile it > > with GNAT and measure the number CPU cycles per FLOP, compare to a > > similar routine in C? > > The shootout seems to put GNAT closer to Perl and Java than to C/C++. > > The shootout numbers I saw put vc at .07, gcc at 0.10 and GNAT at .20. > Java was 0.73 and Perl was 34.31. > > I do not see how .2 is closer to .7 or 34 than it is to .1. > > Your mathematics seems seriously flawed. Only to the uninitiated :) To keep it simple (I'm a mathematician actually), you seem to be giving special importance on the execution _time_ and the _arithmetic_ average, as opposed to, say, execution _speed_ (or the _harmonic_ average). Let's compare speeds in tasks per second using your data: VC = 14.2 GCC = 10.0 GNAT = 5.0 Java = 1.4 Perl = 0.03 Now can you see how GNAT is "closer" to both Java and Perl than even to the "slower" of the C compilers here? :) I replaced the dead Java group with comp.lang.fortran - maybe they'll clue us in on the matrix multiplication performance issues (or at least keep Adaists from feeding us strange explanations). To recap the discussion (or my understanding of it) : 1. GNAT, an Ada compiler, is a front end to GCC and so should use the same "window" (i.e. local) optimizations GCC does 2. Arrays are unaliased in Ada (as I understood), much like in FORTRAN, which may be beneficial in terms of performance (given that the compiler takes advantage of this, and I believe, in case of GCC, it does) 3. Ada is compiled to native code and isn't garbage collected, which puts its execution mode in the same language group with C, C++ and Fortran And yet, dispite all of these (especially (1)). GNAT did not fair as well as GCC and G++ (I'm sure G77 would have done at least as well). MSG P.S. BTW is the code generated by IFC as fast as G77 on modern CPUs (P4 and Athlon)? Is it worth bothering with IFC on benchmarks, etc.?