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=2.0 required=5.0 tests=BAYES_00,FORGED_MUA_MOZILLA, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,7acba51c7f27ee27,start X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.204.141.4 with SMTP id k4mr563136bku.6.1337192744201; Wed, 16 May 2012 11:25:44 -0700 (PDT) Path: e27ni317bkw.0!nntp.google.com!news1.google.com!goblin3!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: "Nasser M. Abbasi" Newsgroups: comp.lang.ada Subject: is having a complex type as built-in the languages vs. being in standard package makes performance difference? Date: Wed, 16 May 2012 13:25:38 -0500 Organization: Aioe.org NNTP Server Message-ID: Reply-To: nma@12000.org NNTP-Posting-Host: JFgm6aMVwmC/YQNQyUTYRQ.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 X-Notice: Filtered by postfilter v. 0.8.2 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Date: 2012-05-16T13:25:38-05:00 List-Id: Just a basic question for the experts. Ada provides complex data types by a package: http://progopedia.com/language/ada/ "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" While a language like Fortran, complex type is 'built-in' the language, i.e. part of the language intrinsic data types. What I wondered about is: would this makes a difference when it comes to the performance of generated code that uses these types in computations? i.e. Would the code generated by the compiler by more 'efficient' somehow if complex was built-in vs. being provided by a package, or do you think by the time the compiler is done with the code generation and optimization, then this all becomes irrelevant 'similar' compiler backend generated code will eventually result in terms of efficiency of the computation? (It might be possible actually to see this using gcc since it supports both gnat and gfortran as front end?). On a side-note, any one knows why when Ada was originally designed in late 1970's, why complex type was not included as part of its basic data types? thanks, --Nasser