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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,64fc02e079586f1b X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news.glorb.com!newsfeed1.uni2.dk!newsfeed1.swip.net!swipnet!nntpserver.swip.net!not-for-mail From: David Sauvage User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050324 Debian/1.7.6-1 X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: [Shootout] Spellcheck.adb References: <1114464642.518876.137610@f14g2000cwb.googlegroups.com> In-Reply-To: <1114464642.518876.137610@f14g2000cwb.googlegroups.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Tue, 26 Apr 2005 21:36:57 +0200 NNTP-Posting-Host: 83.177.237.209 X-Complaints-To: news-abuse@swip.net X-Trace: nntpserver.swip.net 1114544216 83.177.237.209 (Tue, 26 Apr 2005 21:36:56 MET DST) NNTP-Posting-Date: Tue, 26 Apr 2005 21:36:56 MET DST Organization: A Customer of Tele2 Xref: g2news1.google.com comp.lang.ada:10733 Date: 2005-04-26T21:36:57+02:00 List-Id: Hi, happy to read your post, also because i'm the folk who proposed the spellcheck ada implementation :-), i don't undestand yet the shootout spellcheck error as it works nicely on my system, does it failed on yours too ? may be you could describe the errors here if so ? thanks albert.bachmann@gmx.de wrote: > Now what I'd like to ask you is how I can speed up my Ada solution? You can find interesting discussion on the spellcheck implementation & speed issue in the thread named "Ada Bench" of comp.lang.ada you could use : - Ada.Streams.Stream_IO.Read instead of Ada.Text_IO.Get_Line - the shootout spellcheck C++ hash function as hash function albert.bachmann@gmx.de wrote: > > real 0m0.742s > user 0m0.720s > sys 0m0.009s > Is it for N=1 ? could you describe your system configuration & the command line used to launch the program ? Well done, i was about 5 min on my first implementation ;-) here is the shootout spellcheck implementation (for N=1) duration, you can take a look on my system configuration on the Ada Bench thread : real 0m0.126s user 0m0.078s sys 0m0.013s To compare (just because we are talking about benchmark and how to speed up our programs) here is your posted implementation on my system (i add the line with Ada.Strings.Fixed; as "strings.fixed.delete" was not handle by my compiler without it) real 0m1.432s user 0m1.361s sys 0m0.014s Your next version should be far far better ;-) Hope it could help ;-) David