From: Georg Bauhaus <rm.tsoh.plus-bug.bauhaus@maps.futureapps.de>
Subject: Re: Tasking for Mandelbrot program
Date: Sun, 27 Sep 2009 23:27:52 +0200
Date: 2009-09-27T23:27:59+02:00 [thread overview]
Message-ID: <4abfd8df$0$31337$9b4e6d93@newsspool4.arcor-online.net> (raw)
In-Reply-To: <d2c291f4-9ba9-4ac0-8599-d3d98c2888f8@j9g2000vbp.googlegroups.com>
Martin wrote:
> On Sep 27, 2:08 am, Georg Bauhaus <rm.tsoh.plus-
> bug.bauh...@maps.futureapps.de> wrote:
> [snip]
>> Z2 := (Z.re ** 2, Z.im ** 2);
> [snip]
>
> Don't know about the rest of the program but on some platforms I've
> found it to be much faster to replace "** 2" with a straight
> multiplication, e.g. "Z.re * Z.re, Z.im * Z.im".
I have just checked. The code that gcc is generating looks
the same for ** 2 and for * Z.xx. Irrespective of either
sse instructions or i387 instructions.
Some more observations:
- SSE2 code performs 8% faster when suitable compilation options
are present, -mfpmath=sse -msse2 (this is currently the case).
Then digits 15 should probably stay in the declaration of Real.
- writing the image bytes with Stream_IO removes 6% running time
when compared to GNAT.IO.Put.
This adds standard Ada but also adds about 10 lines of code for
the Put procedure and a Stdout variable. Is it worth it?
next prev parent reply other threads:[~2009-09-27 21:27 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-27 1:08 Tasking for Mandelbrot program Georg Bauhaus
2009-09-27 11:24 ` Martin
2009-09-27 21:27 ` Georg Bauhaus [this message]
2009-09-28 5:48 ` Martin
2009-09-28 19:27 ` jonathan
2009-09-29 15:26 ` Georg Bauhaus
2009-09-28 19:52 ` jonathan
2009-10-12 16:58 ` Georg Bauhaus
2009-10-12 22:46 ` jonathan
2009-10-12 23:42 ` Anh Vo
2009-10-13 9:11 ` Mark Lorenzen
2009-10-13 9:39 ` Gautier write-only
2009-10-13 12:57 ` Georg Bauhaus
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox