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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no 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!x25g2000prf.googlegroups.com!not-for-mail From: Anh Vo Newsgroups: comp.lang.ada Subject: Re: Tasking for Mandelbrot program Date: Mon, 12 Oct 2009 16:42:46 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <4abebaf4$0$31342$9b4e6d93@newsspool4.arcor-online.net> <4abfd8df$0$31337$9b4e6d93@newsspool4.arcor-online.net> <59856ad8-2434-4370-a1df-875b46b3b7bc@o41g2000yqb.googlegroups.com> <4ad36024$0$7626$9b4e6d93@newsspool1.arcor-online.net> <911cc4ac-f786-4b44-8656-94756b3d4af3@a32g2000yqm.googlegroups.com> NNTP-Posting-Host: 149.32.224.33 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1255390966 19995 127.0.0.1 (12 Oct 2009 23:42:46 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 12 Oct 2009 23:42:46 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: x25g2000prf.googlegroups.com; posting-host=149.32.224.33; posting-account=Qh2kiQoAAADpCLlhT_KTYoGO8dU3n4I6 User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; GTB6; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; InfoPath.1; .NET CLR 3.0.04506.648),gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:8687 Date: 2009-10-12T16:42:46-07:00 List-Id: On Oct 12, 3:46=A0pm, jonathan wrote: > On Oct 12, 5:58=A0pm, Georg Bauhaus > wrote: > > > Lo and behold! =A0An Ada program is at #1 in two lists > > at the Shootout site. =A0Look for mandelbrot, the 64 > > bit rankings. =A0Enjoy the moment while it lasts. :-) > > Here is the address: > > http://shootout.alioth.debian.org/u64q/benchmark.php?test=3Dmandelbrot&..= . > > > The high speed is largely due to the new inner loop, > > composed by Jonathan Parker. > > Well, I figured it out by reading the C program;) The C and C++ > programs use INTEL sse2 intrinsics to get the best > performance out of the sse2 floating point units. > The INTEL sse2 intrinsics are IIUC a convenient interface > to intel sse2 assembly language:http://msdn.microsoft.com/en-us/library/k= cwz153a(VS.71).aspx > > The result we can be proud of is the finding that GNAT/gcc > is just smart enough to produce optimal code without the > use of INTEL sse2 intrinsics, at least on the 64 bit machine. > The key to getting the best performance out of > the SSE hardware was presenting it > with 2 identical streams of instructions, each of which > starts with different initial conditions. It can > be done in high-level language as well as > the sse2 intrinsics. > > The challenge in this part of the shootout was > non-trivial: =A0to get the mandelbrot calculation to > exploit all 4 cores of the test machine in parallel, (a > load-balancing/distributed-processing problem I mentioned > earlier in this thread) and to simultaneously put the > SSE floating point units to best use. The 4 programs > that did the best at this used: > C =A0 + pthreads + INTEL sse2 intrinsics, > C++ + OpenMP =A0 + INTEL sse2 intrinsics, > ATS + pthreads(?) + INTEL sse2 intrinsics, > and > Ada + Ada + Ada. It is impressive. I feel proud that Ada comes in first. So, Ada foes have no more execuses to say Ada is slow. Great job Jonathan. Anh Vo