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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,154942e4f1d1b8e9 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!newsfeed2.dallas1.level3.net!news.level3.com!newsfeed-00.mathworks.com!kanaga.switch.ch!news-zh.switch.ch!switch.ch!news.hispeed.ch!linux2.krischik.com!news From: Martin Krischik Newsgroups: comp.lang.ada Subject: Re: Dynamically tagged expression required Date: Thu, 15 Dec 2005 21:10:57 +0100 Organization: Cablecom Newsserver Message-ID: <24672866.sB0hhNGmCm@linux1.krischik.com> References: <2852224.m2vuDFxfOX@linux1.krischik.com> <4718553.l2jsoQ7pK7@linux1.krischik.com> <49330337.ekYkZUKDL9@linux1.krischik.com> NNTP-Posting-Host: 80-218-112-22.dclient.hispeed.ch Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: news.hispeed.ch 1134754233 3147 80.218.112.22 (16 Dec 2005 17:30:33 GMT) X-Complaints-To: news@hispeed.ch NNTP-Posting-Date: Fri, 16 Dec 2005 17:30:33 +0000 (UTC) User-Agent: KNode/0.10 Xref: g2news1.google.com comp.lang.ada:6899 Date: 2005-12-15T21:10:57+01:00 List-Id: Maciej Sobczak wrote: > Martin Krischik wrote: > >>>>Yes. But it only look like the parameter is initialized. Internally the >>>>compiler likely to use a pointer to pass the paramer to speed up things. >> >>>I don't care. :) >>>I don't want to call something a "pointer" when it isn't in my program. >> >> I don't care either. But we at c.l.a had to repeat the << "in" is not >> slower then "access" >> mantra so often that we just say it automatily >> now ;-) . > > OK, I see. I think it's "normal" in some way - we (on other forums) are > busy breaking myths about C++ as well. ;) > > As for your mantra - depending on how compiler does its job, "in" might > be actually *faster* than "access" for the following reason: "access" > might imply indirection, whereas "in" might be just another (although > const) name for the actual parameter, especially when the compiler > inlines the whole call. I don't see anything that would forbid this and > therefore I wouldn't be surprised to see such "inverse" effects in > performance measurements. Is this reasoning correct for Ada? "pass by register" is an option for Ada as well. Maybe not for Intel CPU due to the limited amount of registers available. Martin -- mailto://krischik@users.sourceforge.net Ada programming at: http://ada.krischik.com