Re: Bigloo Regexp: m/ /ms (now: Regular Parsing)

Laurent Bloch <[email protected]>
Newsgroups gmane.lisp.scheme.bigloo
Message-ID <20150423095751.196a5ff7@akhmatova>
Le jeudi 23 avril 2015 [email protected] a écrit ceci :

> > > Although not recommended in general, this solution will deliver decent 
> > > performance in your case.
> > 
> > As the system we try to emulate is a Python library, the performance 
> > should be comparable.
> > 
> > > The other solution would be to use pregexp (your first intuition) but 
> > > as pregexp requires a string, you will have to read the whole file in 
> > > memory first, which means that this solution will only work for toy 
> > > examples.
> > 
> > > As a side note, if your pattern is basic regular expression only made 
> > > of sequences of characters, then you might prefer using KPM and mmap.
> > 
> > KMP, I suppose? We need Regexps more complex than just strings. But I am
> Yes. Sorry for the typo. KMP.
> 
> > curious about the way Perl manages multi-lines queries, we would do the 
> > same.
> 
> If the pattern you are looking for is statically known, then of course,
> compile the grammar. This will deliver the best result. My guess is that
> is it will be significantly faster then traditional regular expressions,
> but this has to be verified.

And what about mmap + pregexp-match ?

Cheers!

-- 
Laurent Bloch - http://www.laurentbloch.org - [email protected]
Tél. mob. : 06 03 12 16 97 - priv. : 01 43 14 04 55 - GPG : 45534C55
Le ciel se rit des prières qu'on lui fait pour détourner de soi des maux
dont on persiste à vouloir les causes. (B)
signature.asc (application/pgp-signature, 473 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEcBAEBAgAGBQJVOKX/AAoJEMUeFwJFU0xVJNYH/2WaXFbxVHibqccVIVr+dlSS
CdkbR1zismbmkZJOBfIUVoDjtFDzIPsYGogPsMXLraJ4cBHf0wd+9/Bpk9qLVgtL
rq9rjV5Puwx/lxAgCiD7ETWTx+eXwuQH/2um7VDcK07C2xfjnd729uH99lmbjkcI
DgnkAchRvI4d28wVD6Fl4zwVPBNETenlMNFY5aa1xbZ4FrlWdTxINtkZlkwtGASG
Vy+o1N+IVZiwKfQlVdcyMdrayvaCNR/MrC5lPTy06v/5VrfbSACcsc0CPayHvd3c
MfAmBcSDXbEKMUeY4EKLm2MfNxi3H76IaRLy71baIN2rZ538OdrmNtaM5w/LIlI=
=To5T
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.