comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <rm.dash-bauhaus@futureapps.de>
Subject: Re: is having a complex type as built-in the languages vs. being in standard package makes performance difference?
Date: Wed, 16 May 2012 21:23:17 +0200
Date: 2012-05-16T21:23:18+02:00	[thread overview]
Message-ID: <4fb3fea6$0$9521$9b4e6d93@newsspool1.arcor-online.net> (raw)
In-Reply-To: <jp0rf3$5kq$1@speranza.aioe.org>

On 16.05.12 20:25, Nasser M. Abbasi wrote:

> "Ada provides complex datatype, which requires using
> packages Generic_Complex_Types and Generic_Complex_Elementary_Functions
> and instantiating them with the type of complex number to use"
...
> i.e. Would the code generated by the compiler by more 'efficient'
> somehow if complex was built-in vs. being provided by a package,

Not a definitive statement on compilers, but some guesses based
on evidence:
If the two components could be cleverly used by the compiler so that
GCCs auto-vectorization becomes effective, maybe. To see advantages
in manipulating (re, im) explicitly and separately now,
these programs demonstrate by computing the same output
at very different speed.

http://shootout.alioth.debian.org/u64/program.php?test=mandelbrot&lang=gnat&id=3
http://shootout.alioth.debian.org/u64/program.php?test=mandelbrot&lang=gnat&id=2
http://shootout.alioth.debian.org/u64/program.php?test=mandelbrot&lang=gnat&id=1



  reply	other threads:[~2012-05-16 19:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-16 18:25 is having a complex type as built-in the languages vs. being in standard package makes performance difference? Nasser M. Abbasi
2012-05-16 19:23 ` Georg Bauhaus [this message]
2012-05-16 21:08   ` Jerry
2012-05-16 21:33     ` georg bauhaus
2012-05-17  1:48       ` Isaac Gouy
2012-05-16 19:26 ` gautier_niouzes
2012-05-17  0:19 ` Randy Brukardt
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox