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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,d901a50a5adfec3c X-Google-Attributes: gid103376,public X-Google-Thread: 1094ba,9f0bf354542633fd X-Google-Attributes: gid1094ba,public From: Geoff Bull Subject: Re: Fortran or Ada? Date: 1998/10/02 Message-ID: <36142547.FA1CD732@acenet.com.au>#1/1 X-Deja-AN: 396883392 Content-Transfer-Encoding: 7bit References: <36068E73.F0398C54@meca.polymtl.ca> <6u8r5o$aa4$1@nnrp1.dejanews.com> <360A3446.8AD84137@lmco.com> <6udre0$ha1$1@nnrp1.dejanews.com> <19980925.185359.250@yktvmv.watson.ibm.com> <6uifdr$dog$1@nnrp1.dejanews.com> <19980928.184428.604@yktvmv.watson.ibm.com> Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@telstra.net X-Trace: nsw.nnrp.telstra.net 907290283 203.35.118.1 (Fri, 02 Oct 1998 11:04:43 EST) Organization: Telstra Big Pond Direct MIME-Version: 1.0 NNTP-Posting-Date: Fri, 02 Oct 1998 11:04:43 EST Newsgroups: comp.lang.fortran,comp.lang.ada Date: 1998-10-02T00:00:00+00:00 List-Id: jbs@yktvmv.watson.ibm.com wrote: > Ada is of course > notoriously inefficient. I was recently subject to a claim that Java optimistation was so good, it was now half as fast as Fortran at numerics, and many times faster than C, C++. I was provoked when I heard a number of people discussing how great it was that "Java's performance problem has now been solved" Unfortunately I didn't have access to a Fortran compiler, but decided to test this claim against Ada & C (using gnat3.10p with gcc2.7.2) on matrix multiplication. For equivalent C and Ada, I found NO difference in performance, (with Ada constraint checking ON) and looking at the generated code it was difficult to understand how Fortran could be faster. For real arithmetic, Java achieved half the speed of C / Ada (which is pretty good, really). With the complex arithmetic the sory was different: Ada was same speed as C if written the same way (and presumably I could have written Java that was half as fast). but if complex types from the Ada library were used, 30% performance hit occured due to creation of intermediate objects Java execution time was an order of magnitude slower due to it use of the heap for Complex objects. I am willing to believe Fortran would have been faster than Ada (when using abstractio) for complex arithmetic because of the compiler's in built support for that type. However I still don't see why it would have been faster than the C, or the C-style Ada. I didn't test Fortran - so what is my point? Comments like the above, while probably intended to inflame the likes of me, are often just accepted without question. Everybody seems to just accept Fortran is such a fantastic numerics language , especially when it comes to performance. Is it really?