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.4 required=5.0 tests=BAYES_00,FORGED_MUA_MOZILLA autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,7acba51c7f27ee27 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.204.152.217 with SMTP id h25mr592875bkw.3.1337197566497; Wed, 16 May 2012 12:46:06 -0700 (PDT) Path: e27ni529bkw.0!nntp.google.com!news1.google.com!goblin2!goblin.stu.neva.ru!xlned.com!feeder1.xlned.com!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Wed, 16 May 2012 21:23:17 +0200 From: Georg Bauhaus User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: is having a complex type as built-in the languages vs. being in standard package makes performance difference? References: In-Reply-To: Message-ID: <4fb3fea6$0$9521$9b4e6d93@newsspool1.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 16 May 2012 21:23:18 CEST NNTP-Posting-Host: 075d4312.newsspool1.arcor-online.net X-Trace: DXC=WZQ=5=cjmBQV0Pe9PRnbJ\ic==]BZ:af^4Fo<]lROoRQnkgeX?EC@@PW`=H1dd=2]Qnc\616M64>ZLh>_cHTX3j]NN;>=bkdKY\ X-Complaints-To: usenet-abuse@arcor.de Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Date: 2012-05-16T21:23:18+02:00 List-Id: 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