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=unavailable autolearn_force=no version=3.4.4 Path: border1.nntp.dca3.giganews.com!border2.nntp.dca3.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!news.glorb.com!us.feeder.erje.net!feeder.erje.net!eu.feeder.erje.net!news.mixmin.net!aioe.org!.POSTED!not-for-mail From: "John B. Matthews" Newsgroups: comp.lang.ada Subject: Re: Optimizing Ada Date: Wed, 02 Oct 2013 14:58:07 -0400 Organization: The Wasteland Message-ID: References: <8aca502c-bba8-4af5-9192-459c15fe048b@googlegroups.com> <74846968-cda1-4643-9c11-c38ce5c55949@googlegroups.com> NNTP-Posting-Host: LQJtZWzu+iKlBROuDg+IUg.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) X-Notice: Filtered by postfilter v. 0.8.2 X-Original-Bytes: 2264 Xref: number.nntp.dca.giganews.com comp.lang.ada:183577 Date: 2013-10-02T14:58:07-04:00 List-Id: In article , Jeffrey Carter wrote: > On 10/01/2013 08:53 PM, kennethesills@gmail.com wrote: > >> Ada is the fastest correct implementation you have. > > > > Yes. However, is case sensitivity the reason for a 2.7x slow down? > > Highly unlikely. In fact, using case-sensitive comparisons in Ada > > only reduce the time taken by around 50ns. So I just disregarded > > that fact. > > I agree that the implementation of Indefinite_Hashed_Maps is probably > the culprit, but until you have an apples-to-apples comparison, you > have no complaint. (Actually, I can't think of any application that > could use such a function where the difference would prevent it from > meeting reasonable timing requirements, so you probably have no > complaint anyway.) kennethesills: For comparison with Indefinite_Hashed_Maps, this example uses an instance of Ada.Strings.Bounded.Generic_Bounded_Length as the Key_Type in an instance of Ada.Containers.Hashed_Maps. Your problem domain may suggest a suitable maximum length. -- John B. Matthews trashgod at gmail dot com