caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] RE: a regular expression library
@ 2001-09-25 17:12 Jerome Vouillon
  2001-09-25 18:40 ` Miles Egan
  2001-09-25 19:03 ` Markus Mottl
  0 siblings, 2 replies; 8+ messages in thread
From: Jerome Vouillon @ 2001-09-25 17:12 UTC (permalink / raw)
  To: caml-list


Hello,

I've started to write a regular expression library.  It supports
several styles of regular expressions:
- Perl-style regular expressions;
- Posix extended regular expressions;
- Emacs-style regular expressions;
- Shell-style file globbing
It is also possible to build regular expressions by combining simpler
regular expressions.

The library is still under developpement, but already quite
usable.  The most notable missing features are back-references
and look-ahead/look-behind assertions.

I would greatly appreciate your comments about the library (and, in
particular, about its API).  Contributions and bug reports are also
welcome.

The library can be downloaded from http://sourceforge.net/projects/libre/

The library seems to be pretty fast when compiled to native code.
Here are some timing results (Pentium III 500Mhz):
* Scanning a 1Mb string containing only 'a's, except for the last
  character which is a 'b', searching for the pattern "aa?b"
  (repeated 100 times).
    - RE: 2.6s
    - PCRE: 68s
* Regular expression example from http://www.bagley.org/~doug/shootout/
    - RE: 0.43s
    - PCRE: 3.68s
(The library is much slower when compiled to bytecode though, as it
 is entirely written in O'Caml.  I plan to rewrite the critical
 sections of the code in C.)

-- Jerome
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


^ permalink raw reply	[flat|nested] 8+ messages in thread
* Re: [Caml-list] avoiding native call from bytecode issue via dynamic linking
@ 2001-11-09 15:11 Rolf Wester
  2001-11-12  7:58 ` Fabrice Le Fessant
  0 siblings, 1 reply; 8+ messages in thread
From: Rolf Wester @ 2001-11-09 15:11 UTC (permalink / raw)
  To: caml-list

Jeff Henrikson wrote:
> Has anybody considered sidestepping the native/bytecode compatablity
> issue in favor of an all native toplevel?  That is, one which takes an
> expression, compiles it to native code, and loads it back in to code
> space?  For example, write it out to a shared lib, either one for each
> expression (or more likely for efficiency) one for some reasonably sized
> history of expressions.  Then dlopen and dlsym the symbols into place.
> 
It would be great to have a toplevel that compiles to native code. If this
would only be possible under UNIX I would immediately change from NT to
Linux (what I probably should do anyway). Native code compilation in the
toplevel was one of the reasons to consider to use Lisp.

Rolf Wester
-------------------------------------
Rolf Wester
rolf.wester@ilt.fraunhofer.de
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


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

end of thread, other threads:[~2001-11-12  8:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-25 17:12 [Caml-list] RE: a regular expression library Jerome Vouillon
2001-09-25 18:40 ` Miles Egan
2001-09-25 19:03 ` Markus Mottl
2001-09-25 21:22   ` [Caml-list] calling native from bytecode (was RE: a regular expression library) Chris Hecker
2001-09-25 22:40     ` [Caml-list] calling native from bytecode Dave Mason
2001-11-09 15:09     ` [Caml-list] avoiding native call from bytecode issue via dynamic linking Jeff Henrikson
2001-11-09 15:11 Rolf Wester
2001-11-12  7:58 ` Fabrice Le Fessant

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).