1. PCRE

I started playing around with PCRE today, to do some benchmarks.  I compared
it with using the wxEuphoria regex functions.  Basically, I ran through
wxeud.e looking for function/procedure names for building the lookup table
that I use in wxIDE.  I tried using CChris' EuRegExp.e.  I got rid of the
errors that Jeremy found previously, but it still wouldn't work.

Here is the main regex that I used to search:
"^[ \t]*(global[ \t]|)[ \t]*(procedure|function|type|euclass)[
\t]+([a-zA-Z][a-z_0-9A-Z]*)[ \t]*\\("


So I ran the wxEuphoria include file through this (>15,000 lines), substituting
PCRE for wxEuphoria, and the results were impressive (looping 10x):

wx:   2.49
pcre: 0.22

One possible reason for the speedup was the way I was returning the substring
information, since it requires a wxWidgets call to get each substring.  So
I just cut all of that stuff out of the test, and I got:

wx:   2.49
pcre: 0.22

So this can't be the issue.  I've simply linked the interpreter dynamically
to libpcre.  For linux, I still suspect that this is the way to go.  For
Windows, we can't depend on pcre being around, so we'll have to statically
link.

Matt

new topic     » topic index » view message » categorize

2. Re: PCRE

Matt Lewis wrote:
> 
> I started playing around with PCRE today, to do some benchmarks.  I compared
> it with using the wxEuphoria regex functions.
>
> wx:   2.49
> pcre: 0.22
> 

That's a substantial difference. What does wxEuphoria use for regular
expressions? Are they part of wxWidgets?

--
Jeremy Cowgar
http://jeremy.cowgar.com

new topic     » goto parent     » topic index » view message » categorize

3. Re: PCRE

Jeremy Cowgar wrote:
> 
> Matt Lewis wrote:
> > 
> > I started playing around with PCRE today, to do some benchmarks.  I compared
> > it with using the wxEuphoria regex functions.
> >
> > wx:   2.49
> > pcre: 0.22
> > 
> 
> That's a substantial difference. What does wxEuphoria use for regular
> expressions?
> Are they part of wxWidgets?

Yes, it's built into wxWidgets.  It uses Henry Spencer's Regex library.

Matt

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu