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,1e4bb63e08046e1a X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-10-26 00:47:12 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!wn11feed!wn12feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi.com!sccrnsc01.POSTED!not-for-mail From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: is exception when others => null; smart? References: X-Newsreader: Tom's custom newsreader Message-ID: <3Mru9.109492$%d2.41952@sccrnsc01> NNTP-Posting-Host: 12.234.13.56 X-Complaints-To: abuse@attbi.com X-Trace: sccrnsc01 1035618431 12.234.13.56 (Sat, 26 Oct 2002 07:47:11 GMT) NNTP-Posting-Date: Sat, 26 Oct 2002 07:47:11 GMT Organization: AT&T Broadband Date: Sat, 26 Oct 2002 07:47:11 GMT Xref: archiver1.google.com comp.lang.ada:30149 Date: 2002-10-26T07:47:11+00:00 List-Id: > but finalization is *very* expensive in most Ada compilers, A loop calling a procedure procedure p(i : in integer) is x : a_record_with_field_n; begin if x.n /= 0 then global_junk := 1;end if; end p; took 12 nanoseconds on my 866Mhz machine when "x" was an ordinary small record, but nearly 400 nanoseconds when x was controlled and had an explicit Finalize procedure. Similar times with two different compilers. In many contexts objects to be Controlled last long enough that 0.4 microseconds to finalize one is not fatally expensive.