comp.lang.ada
 help / color / mirror / Atom feed
* Benchmarks Game - regex-redux - help needed
@ 2019-03-21 12:58 gautier_niouzes
  2019-03-21 16:17 ` briot.emmanuel
  0 siblings, 1 reply; 5+ messages in thread
From: gautier_niouzes @ 2019-03-21 12:58 UTC (permalink / raw)


It seems that the following benchmark is producing wrong results:

https://benchmarksgame-team.pages.debian.net/benchmarksgame/program/regexredux-gnat-6.html#log

Without an easy access to the PCRE library (seemingly, Perl Compatible Regular Expressions) I wasn't able to reproduce the issue. Side note: why not using GNAT.Regexp ?...

Any clue?

G.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Benchmarks Game - regex-redux - help needed
  2019-03-21 12:58 Benchmarks Game - regex-redux - help needed gautier_niouzes
@ 2019-03-21 16:17 ` briot.emmanuel
  2019-03-21 22:04   ` Simon Wright
  0 siblings, 1 reply; 5+ messages in thread
From: briot.emmanuel @ 2019-03-21 16:17 UTC (permalink / raw)



GNAT.Regexp is a very basic package that only handles a subset of regexps. It does so without backtracking, so it has a fairly predictable run time.

GNAT.Regpat is more capable (translated from an earlier version of the perl regexp engine). It is however not as optimized or as extended as pcre is. The big lacking thing, to my mind, is support for unicode, in this day and age (wasn't an issue 17 years ago :-).

I always wanted to add a binding to pcre in either the GNAT runtime (likely replacing GNAT.Regpat) or GNATCOLL. This should be fairly simple, as the API itself is fairly limited. That would give Ada much more powerful regexps, similar to what all other languages out there have.

Once thing that made it difficult in the beginning was building and packaging an extra external library, but I believe pcre is now a mandatory dependency for gcc anyway, so it is already distributed...

pcre is the de-facto standard for pcre nowadays. Maybe even Perl has now moved to it, though I am not sure. Every one else uses pcre.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Benchmarks Game - regex-redux - help needed
  2019-03-21 16:17 ` briot.emmanuel
@ 2019-03-21 22:04   ` Simon Wright
  2019-03-22  8:11     ` Simon Wright
  0 siblings, 1 reply; 5+ messages in thread
From: Simon Wright @ 2019-03-21 22:04 UTC (permalink / raw)


briot.emmanuel@gmail.com writes:

> Once thing that made it difficult in the beginning was building and
> packaging an extra external library, but I believe pcre is now a
> mandatory dependency for gcc anyway, so it is already distributed...

I've been building GCC 9, and the only trace of pcre on my system is in
the macports installation directory (which I don't have on my default
path).

Looks like an easy-enough install, though -- pcre just built & passed
checks (macOS 10.14.3, GCC 9.0.1)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Benchmarks Game - regex-redux - help needed
  2019-03-21 22:04   ` Simon Wright
@ 2019-03-22  8:11     ` Simon Wright
  2019-04-08 18:29       ` igouy2
  0 siblings, 1 reply; 5+ messages in thread
From: Simon Wright @ 2019-03-22  8:11 UTC (permalink / raw)


Simon Wright <simon@pushface.org> writes:

> briot.emmanuel@gmail.com writes:
>
>> Once thing that made it difficult in the beginning was building and
>> packaging an extra external library, but I believe pcre is now a
>> mandatory dependency for gcc anyway, so it is already distributed...
>
> I've been building GCC 9, and the only trace of pcre on my system is in
> the macports installation directory (which I don't have on my default
> path).
>
> Looks like an easy-enough install, though -- pcre just built & passed
> checks (macOS 10.14.3, GCC 9.0.1)

... and the PCRE-basedversion crashes with a segv while calling
pcre_free() to deallocate something allocated by pcre.

The GNAT.Spitbol version[1] worked a treat.

[1] https://benchmarksgame-team.pages.debian.net/benchmarksgame/program/regexredux-gnat-5.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Benchmarks Game - regex-redux - help needed
  2019-03-22  8:11     ` Simon Wright
@ 2019-04-08 18:29       ` igouy2
  0 siblings, 0 replies; 5+ messages in thread
From: igouy2 @ 2019-04-08 18:29 UTC (permalink / raw)


On Friday, March 22, 2019 at 1:11:27 AM UTC-7, Simon Wright wrote:

> The GNAT.Spitbol version[1] worked a treat.


The memory use was higher.


On this archived web page we can see measurements for the old regex-dna programs, before the requirements were changed --


https://web.archive.org/web/20160529040423/http://benchmarksgame.alioth.debian.org/u64q/measurements.php?lang=gnat

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-04-08 18:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-21 12:58 Benchmarks Game - regex-redux - help needed gautier_niouzes
2019-03-21 16:17 ` briot.emmanuel
2019-03-21 22:04   ` Simon Wright
2019-03-22  8:11     ` Simon Wright
2019-04-08 18:29       ` igouy2

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