From: Georg Bauhaus on 7 Oct 2009 08:04 Olivier Scalbert schrieb: > I have just go to K-Nucleotide program at the Computer Language > Benchmark Game. > Ada is running in 28.51 secs (and now C++ in 16.47 ...) > Is it the last version ? The Ada K-Nucleotide program that is online is the most recent I'm aware of. The leading C++ program (C++ at rank #1 - #3, Ada at #4) seems to try hard to specialize hash functions and comparison for the data given. The Ada program's hash function handles strings of all of the sizes. Guessing, I think that someone with sufficient interest in the set of DNA strings in the test _could_ try to spend some time on producing specialized hash functions (and possibly comparison functions) for strings of the given lengths. Notice that the C++ programs are now comparing strings using sequences of bytes, not characters, in specilizations... ;-)
From: Martin on 7 Oct 2009 09:22 On Oct 7, 12:44 pm, Olivier Scalbert <olivier.scalb...(a)algosyn.com> wrote: > Georg Bauhaus 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. > > Hi all, > > I have just go to K-Nucleotide program at the Computer Language > Benchmark Game. > Ada is running in 28.51 secs (and now C++ in 16.47 ...) > Is it the last version ? > > Thanks, > > Olivier I notice that the CPU usage isn't particularly high - unlike the fastest solutions...is that significant? Cheers -- Martin
From: Olivier Scalbert on 7 Oct 2009 10:15 Martin wrote: > > I notice that the CPU usage isn't particularly high - unlike the > fastest solutions...is that significant? > > Cheers > -- Martin And the memory consumption is higher than C++ (254 Mb versus 131 Mb). Perhaps it is also significant. Olivier
From: Georg Bauhaus on 8 Oct 2009 05:54
Olivier Scalbert schrieb: > Martin wrote: >> >> I notice that the CPU usage isn't particularly high - unlike the >> fastest solutions...is that significant? >> >> Cheers >> -- Martin > > And the memory consumption is higher than C++ (254 Mb versus 131 Mb). > Perhaps it is also significant. Possibly. We'd have to know where and which memory is being used by the Ada program in excess of what the C++ program is using; just speculating, it could be the data structure of elements in GNAT's Table. FWIW, I have tried equality functions for each fragment length specifically. This is worth another 5% less time. I guess it is possible to write tiny hashing functions for at least small fragments without yet more person days being wasted on this program. The C++ programs offer inspiration ;-) |