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: a07f3367d7,3a6a9f1d654285ba X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Wed, 19 Aug 2009 16:52:12 +0200 From: Georg Bauhaus User-Agent: Thunderbird 2.0.0.22 (Macintosh/20090605) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Ada Shootout program for K-Nucleotide (patches) References: <4a743343$0$32674$9b4e6d93@newsspool2.arcor-online.net> <4bc4b12d-40f8-4140-8ef6-326d9e6b8adf@k30g2000yqf.googlegroups.com> <4a897b61$0$30221$9b4e6d93@newsspool1.arcor-online.net> <4d48b846-bb2d-4126-86c2-487b2244c9ad@d4g2000yqa.googlegroups.com> In-Reply-To: <4d48b846-bb2d-4126-86c2-487b2244c9ad@d4g2000yqa.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-ID: <4a8c119d$0$31866$9b4e6d93@newsspool3.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 19 Aug 2009 16:52:13 CEST NNTP-Posting-Host: 4966f64e.newsspool3.arcor-online.net X-Trace: DXC=6i6>5V5EJiK78PK[oJ2ng@McF=Q^Z^V3H4Fo<]lROoRA^YC2XCjHcbIfZBDGQ5@\3J;9OJDO8_SKFNSZ1n^B98iJ@lIkRB`;4bM X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:6900 Date: 2009-08-19T16:52:13+02:00 List-Id: jonathan schrieb: > OK, I did some more work on knuceotide.adb. I'll say in > advance that the code may be .. a bit messy. There is sometimes > no way around this if you are trying for fast rather than elegant. Ada programs won't be alone in that camp, I think? ;-) > -- new version of "=". (Tell me if its right;) [...] Gradually integrating all of your patches into the multitasking version (in reversed order for no planned reason) gives the following improvements on a machine with an AMD Athlon(tm) 64 X2 Dual Core Processor 3800+, 2 GHz, 2GB RAM: N = 2,500,000 10s - no patches 8.7s - new "=" and public definition of Fragments.Bounded_String 8.1s - increasing the read buffer size 5.7s - manual inlining of the hashing function 5.1s - changing Hash_Type to include 1 .. 2**17 - 1 GNAT 4.2.3 (Running the last version on 1 core, not 2, the real time doubled.) With N = 25,000,000 I get real 0m50.467s user 1m28.540s sys 0m0.410s http://home.arcor.de/bauhaus/Ada/knucleotide.j.tasking.gnat As a precaution, I have allocated the larger read buffer on the heap. Emacs Ada mode may have capitalized some identifiers; I hadn't changed the presets on this machine.