1. PCRE
- Posted by Matt Lewis <matthewwalkerlewis at ?mail.com> May 05, 2008
- 651 views
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
2. Re: PCRE
- Posted by Jeremy Cowgar <jeremy at ?owgar.?om> May 05, 2008
- 627 views
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
3. Re: PCRE
- Posted by Matt Lewis <matthewwalkerlewis at ?mail.?om> May 05, 2008
- 635 views
- Last edited May 06, 2008
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