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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,a6449b2443dcdda1,start X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news.germany.com!news.motzarella.org!motzarella.org!not-for-mail From: =?ISO-8859-1?Q?S=E9bastien?= Newsgroups: comp.lang.ada Subject: Access keyword Date: Tue, 29 Apr 2008 13:55:17 +0000 Organization: A noiseless patient Spider Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: feeder.motzarella.org U2FsdGVkX1+PmYT+VKtVgqRNs3Jx4H5lp+LkPk7WEi1bqdax2up7L80g0Gw76jobYePD9QOm1iC2UPICXKXfd5uRK2qTTV1IcBJ9M4U15I6gauRFSzWx+5UB6Nts6V2ocfjorp913+ioD2s81mW/WA== X-Complaints-To: Please send complaints to abuse@motzarella.org with full headers NNTP-Posting-Date: Tue, 29 Apr 2008 13:55:21 +0000 (UTC) X-Auth-Sender: U2FsdGVkX19eQCqlOCsMImfu73Ug0R3FdcfRgEQtViPsoejpuBUasw== Cancel-Lock: sha1:N880rWtBkaiwh/RjvvOVgui12Yk= User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) Xref: g2news1.google.com comp.lang.ada:21113 Date: 2008-04-29T13:55:17+00:00 List-Id: Hi, I'd like to know if there is performance issue using the access keyword? for instance the following code: package MonTest is type Vecteur is record x: Integer; y: Integer; end record; function Norme(v: in Vecteur) return integer; function NormeAccess(v: access Vecteur) return integer; end MonTest; package body MonTest is function Norme(v: in Vecteur) return integer is n: Integer := v.x*v.x + v.y*v.y; begin return n; end Norme; function NormeAccess(v: access Vecteur) return integer is n: Integer := v.x*v.x + v.y*v.y; begin return n; end NormeAccess; end MonTest; Is NormeAccess faster because I'm using access keyword? I read that Ada compiler choose if a reference or a value mode is used in the Norme function, so it would mean that the access keyword should be used only for runtime allocated variable. Sebastien