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,a6449b2443dcdda1 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!feeder.news-service.com!news.astraweb.com!newsrouter-eu.astraweb.com!newsfeed2.ip.tiscali.net!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!t-online.de!news-lei1.dfn.de!news1.uni-leipzig.de!news.uni-jena.de!news.uni-weimar.de!not-for-mail From: stefan-lucks@see-the.signature Newsgroups: comp.lang.ada Subject: Re: Access keyword Date: Tue, 29 Apr 2008 17:16:42 +0200 Organization: Bauhaus-Universitaet Weimar Message-ID: References: Reply-To: stefan-lucks@see-the.signature NNTP-Posting-Host: medsec1.medien.uni-weimar.de Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: tigger.scc.uni-weimar.de 1209482711 8809 141.54.178.228 (29 Apr 2008 15:25:11 GMT) X-Complaints-To: news@tigger.scc.uni-weimar.de NNTP-Posting-Date: Tue, 29 Apr 2008 15:25:11 +0000 (UTC) X-X-Sender: lucks@medsec1.medien.uni-weimar.de In-Reply-To: Xref: g2news1.google.com comp.lang.ada:21116 Date: 2008-04-29T17:16:42+02:00 List-Id: You should do some bechmarks. My guess is that on any decent compiler with full optimisation switched on, the two are running at exactly the same speed. In general, avoiding the access keyword gives the compiler more options to optimise the code, so if either function is faster than the other one, Norme ought to be faster than NormeAccess. > I read that Ada compiler choose if a reference or a value mode is used > in the Norme function, True. You don't need the access keyword to force the compiler to (internally) using pointers ... > so it would mean that the access keyword should > be used only for runtime allocated variable. This is a good rule of thumb. Actually, there are other legitimate uses of the access keyword. But optimising for speed is really bad usage of access, and may even fire back (degrade the performance, rather than improve it). -- ------ Stefan Lucks -- Bauhaus-University Weimar -- Germany ------ Stefan dot Lucks at uni minus weimar dot de ------ I love the taste of Cryptanalysis in the morning! ------