This is particularly annoying because a main force of Xpressive is the ability to construct complex regexp from simplier one, which can be quickly become a nightmare if using pcre or equivalent.īut if it comes with such a performance cost, the benefit looks annihilated.ītw, is the library still maintained ? according to boost changelog, no change since boost 1.55 (11Nov 2013 !) Std::string negative = "sdaoas dof jdfjo fds dsf http:/" If the expression is defined in one go, execution is around 6x faster than if the same regex is built from 3 sub regex. ![]() The inner regex participates fully in the match, back-tracking as needed to make the match succeed.Ĭonsider these 2 ways of defining a regexp matching an uri (probably sub-optimal and not 100%, but the point is not on this topic). The inner regex is invoked by the outer regex during pattern matching. ![]() ![]() It is as if the regex were embedded by value that is, a copy of the nested regex is stored by the enclosing regex. Using Boost Xpressive (static expression), I noticed that pattern searching is much slower when the expression is built from sub regexpression.ĭid I miss something ? or is it inherent with the design ? Xpresive docs says
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |