Re: Ada Shootout program for K-Nucleotide (patches)



On Aug 1, 1:21 pm, Georg Bauhaus <rm.tsoh.plus-
bug.bauh...@xxxxxxxxxxxxxxxxxx> wrote:
This is about the K-Nucleotide program at the
Computer Language Benchmark Game,http://shootout.alioth.debian.org/u32/benchmark.php?test=knucleotide&;...
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.  New version is here:http://home.arcor.de/bauhaus/Ada/knucleotide.gnat

Comments?  Does it work on your machine?

The two changes:

1 - [stack exhaustion] a loop reading input lines into an
 ubounded  string replaces the recursive String "&"ing
 procedure. (Noting that the input text file is ~240MB ...)

2 - [heavy bounded strings] a lightweight bounded string ADT
 replaces an instance of Generic_Bounded_Length, yielding
 an improved running time of ~22s down from ~30s for
 the 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


.



Relevant Pages

  • Re: Ada Shootout program for K-Nucleotide (patches)
    ... where some Ada programs have started to fail. ... - [heavy bounded strings] a lightweight bounded string ADT ... on a relatively small virtual machine running 64bit ...
    (comp.lang.ada)
  • Re: Ada Shootout program for K-Nucleotide (patches)
    ... Georg Bauhaus wrote on comp.lang.ada: ... Computer Language Benchmark Game,http://shootout.alioth.debian.org/u32/benchmark.php?test=knucleotide&;... ... where some Ada programs have started to fail. ...
    (comp.lang.ada)