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,1d575f572a099528 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-12-07 09:26:03 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.media.kyoto-u.ac.jp!news.cc.tut.fi!news.helsinki.fi!not-for-mail From: aaro@iki.fi (Aaro Koskinen) Newsgroups: comp.lang.ada Subject: Re: What is faster Ada or C? Date: 07 Dec 2001 19:26:00 +0200 Organization: University of Helsinki Message-ID: References: <3c08314d$0$158$9b622d9e@news.freenet.de> <3C0BA624.7A12BFA1@boeing.com> <3C10C26B.AA451459@nbi.dk> <3C10F665.FF7D0E4A@nbi.dk> NNTP-Posting-Host: sirppi.helsinki.fi X-Trace: oravannahka.helsinki.fi 1007745961 19420 128.214.205.27 (7 Dec 2001 17:26:01 GMT) X-Complaints-To: usenet@news.helsinki.fi NNTP-Posting-Date: 7 Dec 2001 17:26:01 GMT X-Newsreader: Gnus v5.3/Emacs 19.34 Xref: archiver1.google.com comp.lang.ada:17595 Date: 2001-12-07T17:26:01+00:00 List-Id: Jacob Sparre Andersen writes: > Certainly. (On ix86 processors) GNU C++ inlines the sqrt > operation built into the processor, while GNU Ada makes > calls to a Sqrt function. I thought GNAT could do this as well, there's the following comment in Numerics.Aux: -- This package provides the basic computational interface for the generic -- elementary functions. The C library version interfaces with the routines -- in the C mathematical library, and is thus quite portable, although it may -- not necessarily meet the requirements for accuracy in the numerics annex. -- One advantage of using this package is that it will interface directly to -- hardware instructions, such as the those provided on the Intel 80x87. [...] function Sqrt (X : Double) return Double; pragma Import (C, Sqrt, "sqrt"); A. -- Aaro Koskinen, aaro@iki.fi, http://www.iki.fi/aaro