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.7 required=5.0 tests=BAYES_00,INVALID_DATE, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,9da298537a16487e X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1995-01-13 07:29:00 PST Path: nntp.gmd.de!Germany.EU.net!EU.net!howland.reston.ans.net!agate!darkstar.UCSC.EDU!news.hal.COM!olivea!uunet!newsgate.watson.ibm.com!watnews.watson.ibm.com!ncohen From: ncohen@watson.ibm.com (Norman H. Cohen) Newsgroups: comp.lang.ada Subject: Re: Run-time checking and speed Date: 13 Jan 1995 15:29:00 GMT Organization: IBM T.J. Watson Research Center Distribution: world Message-ID: <3f667s$jie@watnews1.watson.ibm.com> References: <3ev16u$ojc@pong.lasc.lockheed.com> <3f0prq$3bq@theopolis.orl.mmc.com> <3f3deb$4us@gnat.cs.nyu.edu> Reply-To: ncohen@watson.ibm.com NNTP-Posting-Host: rios8.watson.ibm.com Date: 1995-01-13T15:29:00+00:00 List-Id: In article , dsmith@clark.net (Doug Smith) writes: |> OK, some personal experience which has been verified countless times by |> fellow engineers. A small percentage (10%) of the code accounts for (90%) |> of the processing. In case after case, a dynamic analysis tool identifies |> the code executed the most, the engineer optimizes and gets almost an order |> of magnitude speed improvement. |> |> In the old days (i.e. early compilers), I measured executable size differences |> that showed half of the code was constraint checking (Today's compilers do |> a much better job). By redesigning the code to explicitly check for and |> raise the correct exceptions, I could then suppress the compiler generated |> constraint checking. Static measurements of the proportion of instructions in an object file devoted to run-time checks can be very misleading. A good compiler will move many checks out of inner loops, so that, for the reasons explained in the first paragraph above, the proportion of run-time-check instructions among the instructions actually executed will be much smaller. -- Norman H. Cohen ncohen@watson.ibm.com