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 From: "Marin David Condic, 561.796.8997, M/S 731-96" Subject: Re: Fortran or Ada? Date: 1998/09/23 Message-ID: <98092310454016@psavax.pwfl.com>#1/1 X-Deja-AN: 394114202 Sender: Ada programming language Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU X-VMS-To: SMTP%"INFO-ADA@VM1.NODAK.EDU" Newsgroups: comp.lang.ada X-VMS-Cc: CONDIC Date: 1998-09-23T00:00:00+00:00 List-Id: Gisle S{lensminde writes: >But if we write comparable code in both languages, I would think that >Fortran would win in a raw speed test, because some of the Fortran >compilers optimize extremly well. > If you have not already heard from the compiler writers in the crowd, I'm sure you will. You can't really compare "The Speed Of Ada" to "The Speed Of Fortran" because it isn't the language that makes it fast, it's the implementation. I have seen some really crappy code generation done for Ada and I have seen code generation that is every bit as tight as anything you can get out of Fortran. As long as you are comparing similar features (say, basic arithmetic operations, or looping or branching, etc.) I think you'll find that there is no reason why the Ada won't compile down as tightly as similar statements in Fortran. Oh, sure, if you leave in checks that Fortran doesn't perform, you'll see Ada code that is slower. But I don't know of any Ada compilers where you can't disable those checks and run without the safety net if speed is an issue. (We do it regularly around here for our real time control systems.) Also, I've heard tell of Fortran compilers that included support for specialized hardware (the Cray comes to mind) where they could generate extremely fast code to, say, multiply vectors and such. But that's a little like cheating since you are talking about a customized compiler for a very narrow niche. One could do the same with an Ada compiler, but you'd have to be spending the money to build it for the same niche and that might not make economic sense. We regularly build hard, real time systems with Ada and are almost always evaluating some kind of compiler technology. We have yet to see the case made that "Language X" can't be compiled as tightly as "Language Y" provided that both languages implement similar features so that we are comparing apples and apples. (O.K., there *is* Befunge, which is a language beyond the bounds of sanity. So maybe I speak too strongly... ;-) MDC Marin David Condic, Senior Computer Engineer Voice: 561.796.8997 Pratt & Whitney GESP, M/S 731-95, P.O.B. 109600 Fax: 561.796.4669 West Palm Beach, FL, 33410-9600 Internet: CONDICMA@PWFL.COM ============================================================================= "The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man." -- G.B. Shaw =============================================================================