comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <bauhaus@futureapps.de>
Subject: Re: ada is getting spanked :(
Date: Sun, 29 Oct 2006 21:23:27 +0100
Date: 2006-10-29T21:21:07+01:00	[thread overview]
Message-ID: <1162153407.18869.34.camel@localhost.localdomain> (raw)
In-Reply-To: <uD41h.21161$E02.8422@newsb.telia.net>

On Sun, 2006-10-29 at 16:27 +0000, Björn Persson wrote:
> Georg Bauhaus wrote:
> > In order to optimize GNAT's standing, I have made a small
> > but quite effective change to one of Jim Rogers' programs
> > (regex-dna #2), the factor is 14 (fourteen).

The speed factor is now close to 18 :-). After some simplifications,
and after (I think) more closely reflecting the benchmark description.

http://home.arcor.de/bauhaus/Ada/

The program now also works more like the others (in my view).

> Ah, the one that uses Spitbol. Doesn't it really belong under 
> "interesting alternative programs"? The requirements clearly state that 
> regular expressions should be used.

The pattern strings in all programs all look regular to me,
including the GNAT.SPITBOL ones. But that doesn't mean
that the various programs' calls to RE routines such as
.findall, -all, m//g global subst(...) etc. imply "normal"
naive regular expression processing. So GNAT.SPITBOL is no
exception here. (In particular, I have left out obvious
standard SPITBOL improvements in order to reflect the benchmark
description.)
 I guess that the benchmark is also about how well an
implementation deals with just simple REs.

Anyway, I think that all of the RE, PCRE, and SPITBOL patterns
I've seen in many of the contributions reflect the spirit of the
benchmark, as is required (literally).
How could a notion of REs be both precise and precisely
applicable to the ways in which various PLs implement them?
 E.g. how can you turn off Boyer-Moore string searching when
one implementation has it, just so that only some specified
internal way of pattern matching is compared?

So my rule was: Simple patterns, no tricks.

> I fixed up the regex version some time ago and achieved a dramatic 
> improvement, but I didn't touch the Spitbol version. They were very 
> similar before that, and as I recall they had similar performance too.
> My changes are now in "regex-dna Ada 95 GNAT #3".

I did have a look at this program, however with program #3 as is
I keep getting segmentation faults due to the

  Sequence_Lines (1 .. 1_000_000) of type Unbounded_String.

ulimit -s 10000 didn't help, reducing the number of lines did.


regards,
Georg 





  reply	other threads:[~2006-10-29 20:23 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-28 16:29 ada is getting spanked :( cl1
2006-10-28 17:45 ` Martin Krischik
2006-10-28 20:02   ` Georg Bauhaus
2006-10-29  1:34   ` Georg Bauhaus
2006-10-29  2:13     ` Jeffrey R. Carter
2006-10-29  4:48       ` Isaac Gouy
2006-10-30  1:01         ` Isaac Gouy
2006-10-29  2:26     ` Jeffrey R. Carter
2006-10-29  2:30       ` Jeffrey R. Carter
2006-10-29  2:33         ` Jeffrey R. Carter
2006-10-29 17:19           ` Jeffrey R. Carter
2006-10-29 17:25           ` Jeffrey R. Carter
2006-10-29  8:54     ` Martin Krischik
2006-10-29 13:01       ` Georg Bauhaus
2006-10-30  0:46         ` Isaac Gouy
2006-10-29 16:27     ` Björn Persson
2006-10-29 20:23       ` Georg Bauhaus [this message]
2006-10-29 23:50         ` Björn Persson
2006-10-31 11:32           ` Dmitry A. Kazakov
2006-10-31 13:12             ` Georg Bauhaus
2006-10-31 14:14               ` Dmitry A. Kazakov
2006-10-31 18:01       ` Martin Krischik
2006-10-29  4:58   ` Isaac Gouy
2006-10-29  8:46     ` Martin Krischik
2006-10-30  0:17       ` Isaac Gouy
2006-10-30 18:26   ` jtg
2006-10-30 21:50     ` george
2006-10-31  4:57     ` Jeffrey R. Carter
2006-10-31  6:28     ` Gautier
2006-10-31  6:47     ` Martin Krischik
2006-11-02 18:21       ` Jeffrey R. Carter
2006-11-02 19:37         ` Gautier
2006-11-03  5:11           ` Jeffrey R. Carter
2006-11-03 12:06         ` Martin Krischik
2006-11-03 19:59           ` Jeffrey R. Carter
2006-11-12 22:26   ` Shootout / pidigits [Re: ada is getting spanked :(] Gautier
2006-10-28 22:45 ` ada is getting spanked :( Larry Kilgallen
2006-10-29 16:22 ` Leif Holmgren
2006-10-29 17:28   ` Simon Wright
2006-10-29 19:21   ` jtg
2006-10-29 21:33     ` Leif Holmgren
2006-10-31 11:04       ` Harald Korneliussen
2006-11-01 11:28         ` jtg
2006-11-01 14:31           ` Harald Korneliussen
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox