From: jonathan <johnscpg@googlemail.com>
Subject: Re: Ada Shootout program for K-Nucleotide (patches)
Date: Fri, 21 Aug 2009 14:43:46 -0700 (PDT)
Date: 2009-08-21T14:43:46-07:00 [thread overview]
Message-ID: <ea1a2c5e-1368-4735-84b9-8c5104463642@c29g2000yqd.googlegroups.com> (raw)
In-Reply-To: 4a8dcb11$0$31873$9b4e6d93@newsspool3.arcor-online.net
On Aug 20, 11:15 pm, Georg Bauhaus <rm.tsoh.plus-
bug.bauh...@maps.futureapps.de> wrote:
> jonathan wrote:
> > Key.Data(1 .. Length) := Buffer (I-Length+1 .. I);
>
> > The string Key.Data already contains most of the desired
> > data. Since Buffer may be in slower memory, and Key.Data
> > in very fast memory, it makes sense to update
> > Key.Data from itself whenever possible:
>
> Maybe, then, it is worthwhile loading a page worth
> of characters from the big string for the next round
> of fill-up completions? If this loading doesn't happen
> perfectly anyway, that is.
>
> Or if we are at it, we might experiment with slice renamings
> or pointer artihmetic; requires a rewrite, I'd think.
> If the rules permit this at all ;-)
I did make another attempt here. I made the string:
type Bounded_String is record
Data : String(1 .. Max_String_Length);
First : Natural;
Last : Natural;
end record;
Now make Max_String_Length large, and if you want to slide
array Data a distance Shift_Length all you have to do in most
cases is increment First and Last by Shift_Length.
This essentially removed all the overhead in sliding
array Data. I was very pleased with myself. (And again
astonished at how much an Ada compiler can do to help you
get it right.) Unfortunately, it slowed the program
down quite a bit. I think it just made the string "="
more complicated and slower. SO I've happily dropped that
approach.
I'll be off-line for a few days, so let me summarize what
we have. The program is in good shape and very fast.
Martin Krischik wrote a good program, and we've now added a
light-weight string, inlined a few things by hand, and
worked around a GNAT 4.3.3 problem by using unbound strings.
Here's a rough speed estimate, single-core version. My Intel
quad core is similar to the benchmarking machine, just more
MHz. knucleotide.adb runs in ~33 sec on my machine (either
GNAT 4.3.2 or GNAT 4.3.4). I would expect it to run a
bit above 40 sec on the benchmarking machine. On the
benchmarking machine the top entries have running times of:
20 sec, 43 sec, 48 sec, and 55 sec.
Most entries are much slower. So knucleotide.adb is
very respectible by my estimate.
Here's how I made that speed estimate. I took the
faster-than-light (20 second) entry and compiled it
on my quad-core:
g++ -O3 -I ../boost/boost_1_36_0 -fopenmp knucleotide.c++
It ran in 16 sec on my machine, 20 sec on the benchmarking
machine. If that ratio holds, knucleotide.adb runs in
40 sec on the benchmarking machine. (By the way, I can't
make head or tails of the source code of knucleotide.c++.
It doesn't help that I don't know c++;)
It seems to be designed to make good use of OpenMP
style multiprocessing, but resemblance to the original
benchmark is somewhat obscure. Still I am very
impressed, and I wonder how it works so well.)
Anyone who wants to report bugs or offer improvements can
find my single-core only version (knucleotide_3.adb) at
http://web.am.qub.ac.uk/users/j.parker/
in directory bench_depository. Georg has given
his site in the 1st post in this thread.
Jonathan
next prev parent reply other threads:[~2009-08-21 21:43 UTC|newest]
Thread overview: 116+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-01 12:21 Ada Shootout program for K-Nucleotide (patches) Georg Bauhaus
2009-08-01 12:59 ` Ludovic Brenta
2009-08-01 13:59 ` Georg Bauhaus
2009-08-01 13:50 ` Gautier write-only
2009-08-01 15:21 ` Ludovic Brenta
2009-08-01 15:37 ` Gautier write-only
2009-08-02 12:55 ` Georg Bauhaus
2009-08-27 11:17 ` Ole-Hjalmar Kristensen
2009-08-27 12:25 ` Georg Bauhaus
2009-09-01 8:06 ` Ole-Hjalmar Kristensen
2009-09-01 9:29 ` Georg Bauhaus
2009-09-01 10:48 ` Ole-Hjalmar Kristensen
2009-09-01 10:16 ` Ole-Hjalmar Kristensen
2009-09-01 11:34 ` Georg Bauhaus
2009-09-01 12:11 ` Ole-Hjalmar Kristensen
2009-09-01 14:36 ` Georg Bauhaus
2009-09-03 8:49 ` Ole-Hjalmar Kristensen
2009-09-02 8:44 ` Georg Bauhaus
2009-09-02 11:07 ` Ole-Hjalmar Kristensen
2009-09-03 8:13 ` Ole-Hjalmar Kristensen
2009-09-03 10:39 ` Georg Bauhaus
2009-08-03 8:56 ` Jacob Sparre Andersen
2009-08-03 11:43 ` Georg Bauhaus
2009-08-03 12:36 ` Jacob Sparre Andersen
2009-08-03 18:31 ` Isaac Gouy
2009-08-03 20:29 ` Robert A Duff
2009-08-04 15:43 ` Isaac Gouy
2009-08-04 16:06 ` Isaac Gouy
2009-08-04 17:08 ` Georg Bauhaus
2009-08-05 15:58 ` Isaac Gouy
2009-08-05 21:18 ` Georg Bauhaus
2009-08-05 22:04 ` Ludovic Brenta
2009-08-05 22:31 ` Georg Bauhaus
2009-08-05 23:44 ` Jeffrey R. Carter
2009-08-06 8:38 ` Georg Bauhaus
2009-08-06 21:39 ` Georg Bauhaus
2009-08-06 22:42 ` Jeffrey R. Carter
2009-08-07 8:53 ` Georg Bauhaus
2009-08-07 9:21 ` Jacob Sparre Andersen
2009-08-07 9:23 ` Jacob Sparre Andersen
2009-08-09 19:17 ` Georg Bauhaus
2009-08-13 20:56 ` jonathan
2009-08-13 21:30 ` jonathan
2009-08-13 22:08 ` Georg Bauhaus
2009-08-14 15:31 ` jonathan
2009-08-06 7:51 ` Dmitry A. Kazakov
2009-08-06 0:07 ` Isaac Gouy
2009-08-06 8:36 ` Georg Bauhaus
2009-08-06 9:09 ` Dmitry A. Kazakov
2009-08-06 10:34 ` Georg Bauhaus
2009-08-06 10:49 ` Dmitry A. Kazakov
2009-08-06 15:21 ` Isaac Gouy
2009-08-03 20:47 ` Ludovic Brenta
2009-08-01 17:07 ` jonathan
2009-08-01 17:59 ` jonathan
2009-08-02 11:39 ` Georg Bauhaus
2009-08-02 16:00 ` jonathan
2009-08-02 16:42 ` jonathan
2009-09-03 13:44 ` Olivier Scalbert
2009-09-03 14:08 ` Ludovic Brenta
2009-09-03 15:13 ` Olivier Scalbert
2009-09-03 19:11 ` sjw
2009-09-04 6:11 ` Olivier Scalbert
2009-09-04 8:18 ` Ludovic Brenta
2009-09-04 10:17 ` Olivier Scalbert
2009-09-04 12:37 ` Ludovic Brenta
2009-09-04 13:50 ` Olivier Scalbert
2009-09-04 12:50 ` Ludovic Brenta
2009-09-04 16:22 ` Georg Bauhaus
2009-09-04 16:29 ` Georg Bauhaus
2009-09-04 16:38 ` Ludovic Brenta
2009-09-04 17:58 ` Georg Bauhaus
2009-09-04 18:12 ` Georg Bauhaus
2009-09-05 20:16 ` Georg Bauhaus
2009-09-07 7:45 ` Olivier Scalbert
2009-09-07 9:19 ` Georg Bauhaus
2009-09-07 13:31 ` Olivier Scalbert
2009-09-07 14:38 ` jonathan
2009-09-07 15:03 ` Olivier Scalbert
2009-09-07 17:31 ` jonathan
2009-09-07 17:54 ` Olivier Scalbert
2009-09-07 18:07 ` Georg Bauhaus
2009-09-08 0:22 ` Georg Bauhaus
2009-09-04 17:56 ` Martin
2009-09-04 18:26 ` Georg Bauhaus
2009-09-04 21:51 ` Robert A Duff
2009-09-04 18:51 ` Ludovic Brenta
2009-09-04 9:27 ` Georg Bauhaus
2009-09-03 15:28 ` Georg Bauhaus
2009-09-04 1:24 ` Georg Bauhaus
2009-08-04 8:23 ` Martin
2009-08-16 15:20 ` jonathan
2009-08-17 15:46 ` Georg Bauhaus
2009-08-18 16:59 ` jonathan
2009-08-19 14:52 ` Georg Bauhaus
2009-08-19 16:40 ` Martin
2009-08-19 18:24 ` Robert A Duff
2009-08-19 22:15 ` jonathan
2009-08-19 23:50 ` Georg Bauhaus
2009-08-20 19:47 ` jonathan
2009-08-20 22:15 ` Georg Bauhaus
2009-08-21 21:43 ` jonathan [this message]
2009-08-22 22:35 ` Georg Bauhaus
2009-08-23 22:21 ` jonathan
2009-08-20 19:55 ` jonathan
2009-08-19 21:37 ` Georg Bauhaus
2009-08-19 19:22 ` jonathan
2009-08-19 19:27 ` jonathan
2009-08-27 9:05 ` Martin
2009-08-27 9:08 ` Martin
2009-08-27 10:01 ` Georg Bauhaus
2009-10-07 11:44 ` Olivier Scalbert
2009-10-07 12:04 ` Georg Bauhaus
2009-10-07 13:22 ` Martin
2009-10-07 14:15 ` Olivier Scalbert
2009-10-08 9:54 ` Georg Bauhaus
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox