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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,47fc49812a5e8e38 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news3.google.com!feeder.news-service.com!85.214.198.2.MISMATCH!eternal-september.org!.POSTED!not-for-mail From: Colin Paul Gloster Newsgroups: comp.lang.ada Subject: Re: small example, using complex variables in Ada Date: Thu, 10 Jun 2010 16:21:51 +0000 Organization: A noiseless patient Spider Message-ID: References: <6e70b80b-3030-479f-8378-d1281d1fa847@d37g2000yqm.googlegroups.com> <9648de08-0477-40d7-a2ea-0e13e771e94d@z8g2000yqz.googlegroups.com> Reply-To: Colin Paul Gloster Mime-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="8323328-1591023730-1276186928=:3765" Injection-Date: Thu, 10 Jun 2010 15:21:27 +0000 (UTC) Injection-Info: mx03.eternal-september.org; posting-host="kheEuXGHhE2Z5eF1gAST+A"; logging-data="18248"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18csnhjn1l7TMbNmWwTPowMo6wln76a9a/n8z0RVO+dGA==" User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) In-Reply-To: <9648de08-0477-40d7-a2ea-0e13e771e94d@z8g2000yqz.googlegroups.com> Cancel-Lock: sha1:+ZDkZ8wVfsJiQL/Eyu5hKnpY+yM= X-X-Sender: Colin_Paul@Bluewhite64.example.net Xref: g2news2.google.com comp.lang.ada:12573 Date: 2010-06-10T16:21:51+00:00 List-Id: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323328-1591023730-1276186928=:3765 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE On Thu, 10 Jun 2010, Ludovic Brenta sent: |---------------------------------------------------------------------| |"On Jun 10, 5:48=A0pm, Colin Paul Gloster | |wrote: | |> On Wed, 9 Jun 2010, Ludovic Brenta sent: | |> | |> | =A0 =A0 Two_Pi_Over_N : constant :=3D 2 * Pi / N;| = | |> | |> That is a good suggestion. | |> | |> |" =A0 =A0 FOR k in X'range LOOP" =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0| = | |> | |> No. | | | |Why? | | | |> |" =A0 =A0 =A0 =A0 FOR m in data'range LOOP =A0 =A0 =A0 =A0 =A0| = | |> | |> No. Loop down to zero. | | | |Why?" | |---------------------------------------------------------------------| Though there should be no difference, in reality compilers produce less slow machine code when looping down to zero instead of up from zero. |---------------------------------------------------------------------| |"[..] | | | |> Additionally, loop unrolling should be considered. | | | |I agree with this but the solution would be less general." | |---------------------------------------------------------------------| True. Complementing Mathematica with Ada does not indicate that the source code in Ada is supposed to be general instead of fast. The strides in those loops are really indicative that the loops could be worth unrolling or running concurrently. --8323328-1591023730-1276186928=:3765--