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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,38fc011071df5a27 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-06-05 11:02:38 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!arclight.uoregon.edu!wn13feed!wn12feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi.com!rwcrnsc53.POSTED!not-for-mail Message-ID: <3EDF8594.3000901@attbi.com> From: "Robert I. Eachus" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Ideas for Ada 200X References: <6a90b886.0305262344.1d558079@posting.google.com> <3ED41344.7090105@spam.com> <3ED46D81.FF62C34F@0.0> <3ED46E07.4340CABC@0.0> <3ED4F3FD.A0EF7079@alfred-hilscher.de> <6vWcnTWjF83bD0qjXTWcpA@gbronline.com> <3EDCBDF4.1050900@attbi.com> <3EDEC9A7.9050602@attbi.com> <7vy90h2akm.fsf@vlinux.voxelvision.no> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 24.62.164.137 X-Complaints-To: abuse@attbi.com X-Trace: rwcrnsc53 1054836157 24.62.164.137 (Thu, 05 Jun 2003 18:02:37 GMT) NNTP-Posting-Date: Thu, 05 Jun 2003 18:02:37 GMT Organization: AT&T Broadband Date: Thu, 05 Jun 2003 18:02:37 GMT Xref: archiver1.google.com comp.lang.ada:38720 Date: 2003-06-05T18:02:37+00:00 List-Id: Ole-Hjalmar Kristensen wrote: > As you say, it depends on the system whether or not it pays to turn > off the checks. Here are the results from my system. For Integer > turning off the checks is a win, for Float it does not seem to matter. > One other difference: with checks on, the integer "+" is actually > slightly faster than add. With checks off, it's 3 times slower. And you can see why I provided all eight cases. (I probably should have add four Long_Float cases as well.) What you will see depends more on the actual hardware than aything else. You can be compute bound, and the checks will be a significant penalty, or you can be memory access bound, and the checks will add nothing. Also how much of the implicit copy is from cache affects the timing. (Incidently, I didn't do this but if reverse the outside loop in the "+" (for I in reverse...) this will speed things up if the whole array doesn't fit in cache.