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,FREEMAIL_FROM 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 Path: g2news2.google.com!postnews.google.com!k1g2000yqf.googlegroups.com!not-for-mail From: jonathan Newsgroups: comp.lang.ada Subject: Re: Ada Shootout program for K-Nucleotide (patches) Date: Sat, 1 Aug 2009 10:07:36 -0700 (PDT) Organization: http://groups.google.com Message-ID: <60dbce2d-ab4d-4b6c-a3d5-bd4c6fd3b192@k1g2000yqf.googlegroups.com> References: <4a743343$0$32674$9b4e6d93@newsspool2.arcor-online.net> NNTP-Posting-Host: 143.117.23.233 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1249146456 12117 127.0.0.1 (1 Aug 2009 17:07:36 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sat, 1 Aug 2009 17:07:36 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: k1g2000yqf.googlegroups.com; posting-host=143.117.23.233; posting-account=Jzt5lQoAAAB4PhTgRLOPGuTLd_K1LY-C User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.12) Gecko/2009072220 Iceweasel/3.0.6 (Debian-3.0.6-1),gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:7507 Date: 2009-08-01T10:07:36-07:00 List-Id: On Aug 1, 1:21=A0pm, Georg Bauhaus wrote: > This is about the K-Nucleotide program at the > Computer Language Benchmark Game,http://shootout.alioth.debian.org/u32/be= nchmark.php?test=3Dknucleotide&... > where some Ada programs have started to fail. > > In order to have one of them work again, I have patched > knucleotide.gnat, with some success. =A0New version is here:http://home.a= rcor.de/bauhaus/Ada/knucleotide.gnat > > Comments? =A0Does it work on your machine? > > The two changes: > > 1 - [stack exhaustion] a loop reading input lines into an > =A0ubounded =A0string replaces the recursive String "&"ing > =A0procedure. (Noting that the input text file is ~240MB ...) > > 2 - [heavy bounded strings] a lightweight bounded string ADT > =A0replaces an instance of Generic_Bounded_Length, yielding > =A0an improved running time of ~22s down from ~30s for > =A0the 2,500,000 case. > > Still, on a relatively small virtual machine running 64bit > Debian, the program cannot handle the 25,000,000 case. The 250Meg version runs fine on my machine, assuming I did this right...can't make head of tails of the rules. I used ./fasta to make the data files: ./fasta 2_500_000 > fasta25.dat #made a 25Meg file ./fasta 25_000_000 > fasta250.dat #made a 250Meg file compiler: GNAT 4.3.2 (comes with Lenny, thanks to Ludovic & co) Operating system: Debian Linux, Lenny. Processor: Intel x86-64 (Xeon X5460 @ 3.16GHz). Running the bench: time ./knucleotide < fasta25.dat # 7.5 sec time ./knucleotide < fasta250.dat # 76.1 sec Oh, and the new version runs twice as fast as the old - the old took 14 seconds on fasta25.dat. Jonathan