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-09 16:57:41 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!arclight.uoregon.edu!news.tufts.edu!uunet!dca.uu.net!ash.uu.net!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Ideas for Ada 200X Date: 09 Jun 2003 19:57:38 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: 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> <3EDFF543.7060804@attbi.com> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls4.std.com 1055203059 26907 199.172.62.241 (9 Jun 2003 23:57:39 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Mon, 9 Jun 2003 23:57:39 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: archiver1.google.com comp.lang.ada:38881 Date: 2003-06-09T19:57:38-04:00 List-Id: "Robert I. Eachus" writes: > Stephen Leake wrote: > > > Just out of curiosity, why is turning of checks a lose for Float? How > > do checks make the Float code faster? > > Let me give you the thirty-thousand foot veiw, then get down and dirty. > Every compiler generated check has two effects. The first is that it > costs execution resources to perform a check. The second is that the > compiler remembers the state of the check if made, and this can simplify > other code, including other (non-suppressed checks). No, sorry, that is not correct. In code following a check, the compiler can (and should) assume that the check passed. Whether or not the check is suppressed is irrelevant. This is because the semantics of check suppression is that if a suppressed check would have failed, program execution is erroneous (unpredictable). >... The net cost of > doing the checking is the difference of two quantities, so it can be > positive or negative. > > It is also worth noting that suppressing some checks is often the worst > of both worlds. Suprressing a check outside a loop can result in > another check inside the loop needing to be made once for every > repetition of the loop. No, suppressing a check outside a loop has no effect on whether checks inside the loop need to be done. - Bob