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.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ca9eef4d5e2078ea X-Google-Attributes: gid103376,public From: kilgallen@eisner.decus.org (Larry Kilgallen) Subject: Re: Beware: Rep spec on an enumeration type causes code explosion Date: 1997/12/07 Message-ID: <1997Dec7.184308.1@eisner>#1/1 X-Deja-AN: 296121836 References: Reply-To: Kilgallen@eisner.decus.org.nospam X-Nntp-Posting-Host: eisner.decus.org X-Trace: news.decus.org 881538191 13813 KILGALLEN [192.67.173.2] Organization: LJK Software Newsgroups: comp.lang.ada Date: 1997-12-07T00:00:00+00:00 List-Id: In article , gwinn@res.ray.com (Joe Gwinn) writes: > We just ran into a real zinger with the Green Hills Ada95 compiler > (Solaris host, 68060 target, VxWorks 5.2 target OS), although it appears > that the issue may be common to all Ada95 compilers. > Basically, it was spending all of its time in VxWorks, because the Ada RTE > was calling on VxWorks at an astounding rate. This was in turn due to two > things, the handling of enumeration types, and the registration and > deregistration of user-defined exception handlers at every turn. > > Exception handlers. We were declaring a number of exception handlers at > the beginning of each and every module, so every time the module was > entered, the context had to be saved, and every time the module was > exited, the context was popped off the exception stack and discarded, > regardless of if an exception was ever raised. Isn't exception handling efficiency going to be related to the instruction set of the machine and the calling convention of the operating system ? VAX did this in hardware (well, microcode for some models) while Alpha requires a slight bit more work by the compiler to set up the pointer to the handler. I know the VMS calling convention reasonably well, and I have at least seen the Digital Unix one and don't remember it as being too horrible. Are compiler vendors really ignoring OS/hardware provided stack-based exception handling conventions on machines that have them ? Larry Kilgallen