[regex_spirit_xpressive] Are timings of search algo's available vs "by-hand"?
<alert comment="boost newbie">
I've been impressed by the functionality provided by the regex-related
libraries in boost that I've looked at so far. However, before
trekking to far-distant "grok-land" off in the mists, I wanted to get
some idea if there were negligible or minor or major performance
tradeoffs.
I've seen comparisons between regex, spirit, and xpressive (that were
from several years ago and probably obsolete .... done by the library
developers). I'm wondering how these would compare to a "hand-tuned"
state-machine routine, and to an automatically generated state-machine
from a FSM utility (tend to be bloated but can be fast).
My interest is specialized to finding which pattern in a "group" of
patterns was detected, and the offset within the testStr. To
illustrate, the regex would be something like detecting the full or
abbreviated Day-Of-Week:
((Sunday|Sun)|(Monday|Mon)|(Tuesday|Tue)
|(Wednesday|Wed)|(Thursday|Thu)
|(Friday|Fri)|(Saturday|Sat))
The testStr is something like:
std::string testStr =
"Alternate days of the week are Tue and Thursday and Sat and Monday.
"
"And then Monday and Wed and Friday and Sun. "
"Near misses are WeD TuE ThU SuN SaT MoN FrI ";
The real application is inputting a batch of 2mb files and generating
SGML-like output with embedded tags. (e.g. enclose Tue in
participants (1)
-
Lynn Allan