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 X-Google-Thread: 103376,e7e6e919cef50811 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-03-14 03:06:11 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!logbridge.uoregon.edu!news.net.uni-c.dk!uninett.no!ntnu.no!not-for-mail From: Preben Randhol Newsgroups: comp.lang.ada Subject: Re: comparing gnat/Ada95 and g77 Date: Thu, 14 Mar 2002 11:06:10 +0000 (UTC) Organization: Norwegian university of science and technology Message-ID: References: <3c9081f5$1@pull.gecm.com> NNTP-Posting-Host: kiuk0156.chembio.ntnu.no Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: tyfon.itea.ntnu.no 1016103970 12094 129.241.83.82 (14 Mar 2002 11:06:10 GMT) X-Complaints-To: usenet@itea.ntnu.no NNTP-Posting-Date: Thu, 14 Mar 2002 11:06:10 +0000 (UTC) User-Agent: slrn/0.9.7.3 (Linux) Xref: archiver1.google.com comp.lang.ada:21210 Date: 2002-03-14T11:06:10+00:00 List-Id: On Thu, 14 Mar 2002 10:58:06 -0000, Martin Dowie wrote: >> x := x*0.5 + 1.0 + sin(x)*cos(x) + sin(x) + cos(x) + >> sin(x)*sin(x) + cos(x)*cos(x); > > Try changing this line to: > > Sin_X := Sin(X); > Cos_X := Cos(X); > X := X*0.5 + 1.0 + Sin_X*Cos_X + Sin_X + Cos_X + > Sin_X*Sin_X + Cos_X*Cos_X; After removing the IO things from the program the exection time when from approx 19s to approx 5s. The fortran went from approx 15s to approx 4s. (note the gcc backends are different) -- Preben Randhol �For me, Ada95 puts back the joy in programming.�