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.5 required=5.0 tests=BAYES_00,MISSING_FROM, MISSING_MID,MISSING_SUBJECT,URI_HEX autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,bed01d177eaef486 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.66.83.73 with SMTP id o9mr1462197pay.2.1343314790216; Thu, 26 Jul 2012 07:59:50 -0700 (PDT) Date: 2012-07-26T07:59:50-07:00 List-Id: Message-ID: <20120726145950.Qeg9NXH_ZSOdRp_iB93izV-5ql0vcO7kY-Rlz9d4vI4@z> Thu, 26 Jul 2012 07: 59:49 -0700 (PDT) Path: p10ni61947386pbh.1!nntp.google.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!q21no2966974qas.0!news-out.google.com!b9ni64946566pbl.0!nntp.google.com!border1.nntp.dca.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!novia!news-peer1!btnet!zen.net.uk!hamilton.zen.co.uk!xlned.com!feeder7.xlned.com!multikabel.net!newsfeed10.multikabel.net!feed.xsnews.nl!border-1.ams.xsnews.nl!newsfeed.straub-nv.de!news.swapon.de!news.musoftware.de!wum.musoftware.de!news.karotte.org!uucp.gnuu.de!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Mon, 23 Jul 2012 13:50:52 +0200 From: Georg Bauhaus User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Signature Package With Generic Proceedure References: <045f7b44-2a4a-4292-80fd-0b6bc8ee3465@googlegroups.com> <88734b25-68e5-42b2-89ea-0c0e3fc9fbc5@googlegroups.com> <93f32ea9-a61d-4148-83be-258ae0676cac@googlegroups.com> <79925d0c-b2dd-44a3-9451-48f0ee19485f@googlegroups.com> In-Reply-To: <79925d0c-b2dd-44a3-9451-48f0ee19485f@googlegroups.com> Lines: 29 Message-ID: <500d3a9d$0$6566$9b4e6d93@newsspool4.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 23 Jul 2012 13:50:53 CEST NNTP-Posting-Host: ce04f76c.newsspool4.arcor-online.net X-Trace: DXC=Y[=c?;NbY[EWDmlTRbh@=I4IUKJLh>_cHTX3jM6LRJP_KRXID X-Complaints-To: usenet-abuse@arcor.de Bytes: 2381 X-Received-Bytes: 2651 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On 23.07.12 09:30, Keean Schupke wrote: > Object oriented techniques all have considerable runtime costs due to using tagged types, and virtual functions (no inlining). Nitpick: O-O in Ada would not necessarily preclude inlining, since, by default, finding the primitive subprogram is dynamic IFF there is dispatching (when 'Class is involved). GNAT inlines OO.a and OO.b in clients of the following package when the object of type T is specific: package OO is type T is tagged record x : Natural; end record; function a (Object : T) return Natural; function b (Object : T; off : Natural) return Natural; pragma inline (a, b); end OO; package body OO is function a (Object : T) return Natural is (Object.x); function b (Object : T; off : Natural) return Natural is begin return natural'max (1000, Object.x + off); end; end OO;