Date: 2012-07-26T07:59:50-07:00 [thread overview]
raw)
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 <rm.dash-bauhaus@futureapps.de>
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> <a1816272-ef92-4402-bc3a-991bd8522697@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@=I4IUK<Cl32<A4Fo<]lROoRA8kF<OcfhCOKFOi;j7TObNBnc\616M64>JLh>_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;
reply other threads:[~2012-07-26 14:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox