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,bcdac28207102750,start X-Google-Attributes: gid103376,public From: David Starner Subject: Re: Ada95 speed Date: 1999/05/17 Message-ID: <3740C7B1.4CD68529@aasaa.ofe.org>#1/1 X-Deja-AN: 479285436 Content-Transfer-Encoding: 7bit References: <3740C535.7C6200A8@gte.net> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc02.worldnet.att.net 926999691 17557 12.72.227.143 (18 May 1999 03:54:51 GMT) Organization: AT&T WorldNet Services Mime-Version: 1.0 NNTP-Posting-Date: 18 May 1999 03:54:51 GMT Newsgroups: comp.lang.ada Date: 1999-05-18T03:54:51+00:00 List-Id: "Clifford J. Nelson" wrote: > > Ten years ago a Mandelbrot set computation and display on a 1200x700 > screen with eight bit color took six seconds in C on a MacIIfx. > > The following computations (leaving out all the with statements that you > need for the Mac) take ten seconds on an iMac 266 MHertz Mac OS 8.5.1 > with the CodeBuilder Ada95 GNU from Tenon. I think it should run ten > times faster. Was the code identical? I've had two Mandelbrot generators on the same system, and one took hours and one took seconds to do the Mandelbrot. Since the later was carefully and extensively tuned (cf. Fractint), I get the impression that the comparision code may have been similarily tuned. > exit when (abs( Z)) > 2.0; This line is probably the problem. The C code probably never did a sqrt; most likely, the code looked like (z.i* z.i + z.r * z.r) > 4.0. Do the same thing in Ada, and you'll probably see a huge improvement.