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,e7536778f913e61a X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!news.glorb.com!feeder.erje.net!newsfeed.straub-nv.de!noris.net!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Exception handling overhead? Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <9faab480-850c-4ec5-b05e-8daec0301928@x5g2000yqk.googlegroups.com> Date: Fri, 24 Apr 2009 14:42:26 +0200 Message-ID: NNTP-Posting-Date: 24 Apr 2009 14:42:26 CEST NNTP-Posting-Host: 7cd191b6.newsspool4.arcor-online.net X-Trace: DXC=U9hN2a]]Pn\\9P[:DUn00Q4IUK<3[DNcfSJ;bb[UFCTGGVUmh?TLK[5LiR>kgRZORYiE7dXZ_ X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:4562 Date: 2009-04-24T14:42:26+02:00 List-Id: On Fri, 24 Apr 2009 05:06:30 -0700 (PDT), Ludovic Brenta wrote: > GNAT provides two exception handling mechanisms: zero-cost and setjump/ > longjump. "Zero-cost" really means zero _distributed_ cost, i.e. you > incur a cost only when raising an exception, as you describe. The > older setjump/longjump mechanism costs some execution time and memory > whether you raise exceptions or not. It is possible to select either > mechanism when compiling your program. For some details, see the short > mailing list thread starting at [1]. > > [1] http://gcc.gnu.org/ml/gcc/2006-10/msg00270.html > > Of course, this is compiler-specific. Plus, I guess that whatever distributed overhead exceptions might have, it should be negligible comparing to the overhead of unbounded strings. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de