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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,38b27bed88e97415 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-02-20 17:22:38 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!nntp.cs.ubc.ca!cyclone.bc.net!sjc70.webusenet.com!news.webusenet.com!newsfeed2.earthlink.net!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread1.prod.itd.earthlink.net.POSTED!not-for-mail Message-ID: <3E557F4C.1010101@acm.org> From: Jeffrey Carter User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.0.0) Gecko/20020530 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Question: Combination of Access and Constraining References: <1d13e1b4.0302200006.70207b86@posting.google.com> <9d795v0h3qa2922u8vodfhpfvprpre6ak2@4ax.com> <1d13e1b4.0302200720.9666350@posting.google.com> <3E5517AE.1040003@acm.org> <3E553C5E.7B2850FD@tsoft.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 21 Feb 2003 01:21:04 GMT NNTP-Posting-Host: 63.184.33.139 X-Complaints-To: abuse@earthlink.net X-Trace: newsread1.prod.itd.earthlink.net 1045790464 63.184.33.139 (Thu, 20 Feb 2003 17:21:04 PST) NNTP-Posting-Date: Thu, 20 Feb 2003 17:21:04 PST Organization: EarthLink Inc. -- http://www.EarthLink.net Xref: archiver1.google.com comp.lang.ada:34321 Date: 2003-02-21T01:21:04+00:00 List-Id: Yuri wrote: > And how efficient will be eventual comparison/argument > passing code resulting from such Null_Tp constant? Is it going to be > one-instruction comparison in ASM or much more? The answer is, a software engineer doesn't care. Until it is done in the most straightforward, readable, and understandable way, and measurement shows that the system does not meet its timing requirments, and analysis shows that the only way to meet those timing requirements is by dealing with these issues, it's not an issue. Since compilers are very good at dealing with these kinds of things, I doubt it will ever be an issue. Those who worry about such things with no evidence that they are problems are simply wasting the most expensive resource on the project. Since the actual parameter for one of these arguments may be of any length between zero and Positive'Last, they are almost certainly passed by reference, so I don't see that it gains you anything in the parameter passing department over explicitly passing a reference. As for comparison, I guess it depends on what you're doing. An explicit check would look something like if Arg8347'Length = 0 then -- zero-length handling else -- non-zero-length handling end if; If, as is likely, you simply ignore the null parameters, then it will probably look like for I in Arg9387'range loop -- non-zero-length handling end loop; and the loop is not entered if the parameter is null. This should be more "efficient" than if Arg9387 /= null then for I in Arg9387'range loop ... end loop; end if; > For access argument and null it probably will be just on-liner > comparison and one liner passing argument. Since access parameters often have accessability information and associated checks associated with them this may not be correct. -- Jeff Carter "English bed-wetting types." Monty Python & the Holy Grail