On 11/16/2011 2:12 PM, Alexandru Ciobanu wrote:
This is how I run the tests (pseudocode):
recomp()
repeat 1000 times:
regexec()
Thanks for the explanation.
TRex -- 680ms
PCRE -- 610ms ( with pcre_exec() )
PCRE -- 990ms ( with pcre_dfa_exec() )
re2 -- 0.085ms
/usr/include/regex.h -- 0.075ms
TRE -- 0.3ms
The performance variation is interesting. It is probably worthwhile
to use a profiling tool (such as valgrind --tool=callgrind and kcachegrind)
to see where PCRE is spending its time.
Advantages of TRE:
- API very similar to standard regex.h (i.e. easy to integrate with CMake)
- supports wide characters
- compiles on many platforms Windows, AIX, HP-UX, you name it.
What do you think about TRE?
It looks like a promising candidate.
Thanks,
-Brad
--
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers