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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,2c57913d6b8220c1 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!m11g2000yqf.googlegroups.com!not-for-mail From: jonathan Newsgroups: comp.lang.ada Subject: Re: Tasking for Mandelbrot program Date: Mon, 28 Sep 2009 12:27:14 -0700 (PDT) Organization: http://groups.google.com Message-ID: <96599435-110b-4213-a075-69cbeec204c5@m11g2000yqf.googlegroups.com> References: <4abebaf4$0$31342$9b4e6d93@newsspool4.arcor-online.net> <4abfd8df$0$31337$9b4e6d93@newsspool4.arcor-online.net> NNTP-Posting-Host: 143.117.23.233 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1254166034 26589 127.0.0.1 (28 Sep 2009 19:27:14 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 28 Sep 2009 19:27:14 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: m11g2000yqf.googlegroups.com; posting-host=143.117.23.233; posting-account=Jzt5lQoAAAB4PhTgRLOPGuTLd_K1LY-C User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.14) Gecko/2009091008 Iceweasel/3.0.6 (Debian-3.0.6-3),gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:8519 Date: 2009-09-28T12:27:14-07:00 List-Id: On Sep 27, 10:27=A0pm, Georg Bauhaus wrote: > Some more observations: > > - SSE2 code performs 8% faster when suitable compilation options > =A0 are present, -mfpmath=3Dsse -msse2 (this is currently the case). > =A0 Then digits 15 should probably stay in the declaration of Real. > Some more notes on this puzzle ... As far as I can tell, using type Real is digits 16; is like using -mfpmath=3D387 on the command line during compilation. -mfpmath=3Dsse -msse2 is usually (always?) the default. Amazingly, you can now use -mfpmath=3D387,sse. (When I try -mfpmath=3D387,sse, it usually makes things worse, but not always.) With mandelbrot.adb, I find -mfpmath=3D387 (or digits 16) the faster option. It may just be an accident of my machine+compiler combination. My timings are all on Intel processors. On AMD processors I would not be surprised if digits 15 is the faster. Here are some timings of mandelbrot.adb, using 1 worker task, and gnatmake -O3 -gnatnp mandelbrot.adb (same as: gnatmake -O2 -gnatp mandelbrot.adb) On a fairly new PC, single core, with gnat 4.3.4 or 4.3.2, xeon X5460 3.16GHz: digits 16: real 0m34.871s user 0m34.446s sys 0m0.068s digits 15 (with -mfpmath=3Dsse -msse2): real 0m43.657s user 0m43.247s sys 0m0.056s On an old PC, single core: gnat 4.3.2, xenon 2.8 GHz digits 16: real 1m31.885s user 1m31.210s sys 0m0.224s digits 15 (with -mfpmath=3Dsse -msse2): real 1m42.453s user 1m41.706s sys 0m0.184s As mentioned in an earlier post, on spectralnorm.adb (another one of these benchmarks at the shootout site), "digits 16" was the faster choice. It was a lot faster than "digits 15" on my 2 PC's. On the test machine it was faster, but by a smaller margin. But spectralnorm.adb may not predict mandelbrot.adb very well. Jonathan