PCRE

new topic     » topic index » view thread      » older message » newer message

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 thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu