From: Gerd Stolpmann <gerd@gerd-stolpmann.de>
To: Miles Egan <miles@caddr.com>, Markus Mottl <mottl@miss.wu-wien.ac.at>
Cc: OCAML <caml-list@inria.fr>
Subject: Re: features of PCRE-OCaml
Date: Fri, 8 Dec 2000 13:30:55 +0100 [thread overview]
Message-ID: <00120813571607.00625@ice> (raw)
In-Reply-To: <20001207121757.A59914@caddr.com>
On Thu, 07 Dec 2000, Miles Egan wrote:
>On Wed, Dec 06, 2000 at 01:51:39AM +0100, Markus Mottl wrote:
>> Hello,
>>
>> it seems that many people hadn't yet learnt about PCRE-OCaml (the
>> OCaml-interface to the PCRE-library) and have asked for more information
>> on the advantages as compared to the Str-library (or to Perl).
>
>It would be wonderful if this became part of the standard distribution. This is
>a very handy library but I sometimes avoid it because I don't want to deal with
>installing it everywhere I want to run my app.
I would appreciate this, too. PCRE regexps have often a simpler notation
because they need fewer backslashes. Furthermore, the reentrant interface of
PCRE has advantages in multi-threaded programs (with Str, you have to throw
with mutexes after the regexps...)
However, the PCRE stubs can be improved in one point: The master lock could be
released while the engine executes the regexp. Several threads could then
use the engine at the same time which would improve the responsiveness of
multi-threaded programs, and the programs would run faster on SMP systems.
(Currently, the so-called "master lock" prevents that more than one thread runs
at the same time (to avoid problems with uninitialized memory). However, when
O'Caml calls a C function which is thread-safe itself, one can release this
lock for the time of the call, because C can cope with uninitialized memory.)
As regexp matching takes some time, there could be an interesting speedup for
programs that massively apply regexps.
Gerd
--
----------------------------------------------------------------------------
Gerd Stolpmann Telefon: +49 6151 997705 (privat)
Viktoriastr. 100
64293 Darmstadt EMail: gerd@gerd-stolpmann.de
Germany
----------------------------------------------------------------------------
next prev parent reply other threads:[~2000-12-11 16:56 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-12-06 0:51 Markus Mottl
2000-12-07 16:01 ` John Max Skaller
2000-12-07 16:32 ` Markus Mottl
2000-12-07 17:08 ` John Max Skaller
2000-12-08 0:03 ` Markus Mottl
2000-12-08 17:52 ` John Max Skaller
2000-12-08 9:19 ` Alain Frisch
2000-12-08 18:11 ` John Max Skaller
2000-12-08 19:48 ` Alain Frisch
2000-12-09 17:07 ` John Max Skaller
2000-12-14 17:35 ` unicode support Nickolay Semyonov
2000-12-07 20:17 ` features of PCRE-OCaml Miles Egan
2000-12-08 12:30 ` Gerd Stolpmann [this message]
2000-12-08 15:05 ` Markus Mottl
2000-12-08 15:40 ` Gerd Stolpmann
2000-12-09 3:03 ` Markus Mottl
2000-12-09 13:12 ` Gerd Stolpmann
2000-12-10 0:32 ` Markus Mottl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=00120813571607.00625@ice \
--to=gerd@gerd-stolpmann.de \
--cc=caml-list@inria.fr \
--cc=miles@caddr.com \
--cc=mottl@miss.wu-wien.ac.at \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).