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.2 required=5.0 tests=BAYES_00,FROM_WORDY, INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,fd3a5ba6349a6060 X-Google-Attributes: gid103376,public From: "Nick Roberts" Subject: Re: should I be interested in ada? Date: 1999/02/19 Message-ID: <7aknfn$au1$1@plug.news.pipex.net>#1/1 X-Deja-AN: 446211712 References: <7a72e6$g55$1@probity.mcc.ac.uk> <36C93BB4.1429@ecs.soton.ac.uk> <7afc1o$3mi$2@plug.news.pipex.net> <7afttr$7v3$1@nnrp1.dejanews.com> <7aganu$qsc$1@plug.news.pipex.net> <36CC11A1.C7A71642@hercii.mar.lmco.com> <7ahkn0$kab$1@plug.news.pipex.net> <36CC6AC0.25DBE56D@erols.com> <7aikfp$nhq$3@plug.news.pipex.net> <7ajkhb$dol$1@nnrp1.dejanews.com> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Organization: UUNET WorldCom server (post doesn't reflect views of UUNET WorldCom) Newsgroups: comp.lang.ada Date: 1999-02-19T00:00:00+00:00 List-Id: robert_dewar@my-dejanews.com wrote in message <7ajkhb$dol$1@nnrp1.dejanews.com>... |In article <7aikfp$nhq$3@plug.news.pipex.net>, | "Nick Roberts" wrote: |> Thus, the high-level language is, theoretically, |> completely immaterial [to quality of fpt code] | |Not quite. The aliasing rules for parameters in Fortran |are quite different from those in Ada, and clearly are |preferable from a code generation point of view. How |significant this is in *practice* is open to question, |but in *theory* Fortran can sometimes produce better code. Correct for most existing Ada and Fortran compilers. However, I do not believe that this would be true for an Ada compiler which generates code 'late' (i.e. effectively at the linking stage). Under alias analysis, an Ada subprogram which is never called with aliased parameters (i.e. two or more by-reference parameters which have the same object as actuals) can be compiled to assume the corresponding formals will never be aliased. This assumption is useful (only) where one or both parameters are modified, because it allows rescheduling (and sometimes other optimisations) of the writes. 'Late code' compilers can always do this analysis globally, and thus can always perform this potential optimisation. I believe there is a trend, these days, for aggressively optimising compilers to be of the 'late code' persuasion (mine will be). Of course, admittedly, even such compilers cannot get round the problem for the generation of a 'shared object' library (aka DLL). On the other hand, ironically, Fortran (77 and 90) often cannot perform this optimisation (reliably), since the language has always suffered from the fact that not all compilers have enforced the 'no aliasing' rule, and therefore many programs (unfortunately) have been written which take advantage of this fact. ------------------------------------- Nick Roberts -------------------------------------