Jin Sun wrote:
Can anybody tell me which one has better performance?
Well it depends what you mean :-) I'd be surprised if there was much difference between the core regex engines: maybe one would be slightly better at some things the other at different things. Where you gain with Boost.Regex is in the ability to write the surrounding code in a compiled language rather than have it interpreted. Whether you succeed in making your app faster as a result will mainly depend on how cunning you are at avoiding unnecessary copying/memory allocations in your code logic: to put it another way, badly written C++ can be the slowest thing around, while well written code can be as fast as any language out there. Oh, and not all regular expressions are created equal: if the problem is the speed of the regex matching, then it's likely a problem with the regex you're using. Just my - entirely biased - 2c, John Maddock.