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,9f842cdf16abf4b9 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news.glorb.com!newsfeed-0.progon.net!progon.net!news-zh.switch.ch!switch.ch!cernne03.cern.ch!not-for-mail From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: Re: Ada.Containers.Indefinite_Hashed_Maps Date: Thu, 26 Apr 2007 14:12:18 +0200 Organization: CERN News Message-ID: References: <1177510391.733055.133060@n35g2000prd.googlegroups.com> NNTP-Posting-Host: pb-d-128-141-44-112.cern.ch Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: cernne03.cern.ch 1177589541 10850 128.141.44.112 (26 Apr 2007 12:12:21 GMT) X-Complaints-To: news@@cern.ch NNTP-Posting-Date: Thu, 26 Apr 2007 12:12:21 +0000 (UTC) User-Agent: Thunderbird 1.5.0.10 (Macintosh/20070221) In-Reply-To: Xref: g2news1.google.com comp.lang.ada:15306 Date: 2007-04-26T14:12:18+02:00 List-Id: Jeffrey R. Carter wrote: > if Maps.Contains (Map, Some_Key) then > Position := Maps.Find (Map, Key => Some_Key); You do the same key search once for Contains and once for Find. That gives twice the same work. Is there a way to make the search once? -- Maciej Sobczak : http://www.msobczak.com/ Programming : http://www.msobczak.com/prog/