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-Thread: a07f3367d7,13280cdb905844e4 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!usenet-fr.net!gegeweb.org!aioe.org!not-for-mail From: "John B. Matthews" Newsgroups: comp.lang.ada Subject: Re: Is there an Ada compiler whose Ada.Numerics.Generic_Elementary_Functions.Log(Base=>10, X=>variable) is efficient? Date: Mon, 15 Feb 2010 12:19:35 -0500 Organization: The Wasteland Message-ID: References: NNTP-Posting-Host: LQJtZWzu+iKlBROuDg+IUg.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) Xref: g2news1.google.com comp.lang.ada:9240 Date: 2010-02-15T12:19:35-05:00 List-Id: In article , Colin Paul Gloster wrote: > Thanks for running it. The Ada program for timing had 500 statements > in the body of the loop. I reproduced only the first and last > verbatim: I showed a bash (Bourne Again SHell) line for producing > all 500 statements in a comment in-between the the first statement > and the last statement. You ran a program with 498 of the statements > missing. Ah, source level compression! > Anyway, the answer produced by the program is not so much of concern > as the relative speeds of different implementations. Did g++ > produce a faster result for you than GNAT? It did for me for many > versions of GCC today on a different platform than I used in the > beginning of this thread... Retesting both 500+ line programs produces results similar to yours: $ make test Darwin: gcc 4.3.4 rm -f *.o *.ali b~* core rm -f *.s temp.txt logada logcpp gnatmake logada -cargs -O3 -gnatnp -bargs -shared -largs -ffast-math -dead_strip gcc -c -O3 -gnatnp logada.adb gnatbind -shared -x logada.ali gnatlink logada.ali -shared-libgcc -ffast-math -dead_strip g++ -O3 logcpp.cc -o logcpp time ./logcpp 6.35785e+08 0.57 real 0.56 user 0.00 sys time ./logada 6.35785378608776E+08 28.15 real 28.10 user 0.02 sys -- John B. Matthews trashgod at gmail dot com