Subject: Re: [boost] [xpressive] Performance Tuning?
From: Dave Jenkins (david_at_[hidden])
Date: 2009-07-02 10:01:05
"Stewart, Robert" <Robert.Stewart_at_[hidden]> wrote in message
> Unfortunately, my results don't bear that out with the added overhead of
> locating the smatch via thread local storage. I see no difference between
> default constructing an smatch each time and reusing an instance from TLS.
It's disappointing that locating a match_results object in thread-local
storage takes approximately the same amount of time as default constructing
a new one. I had hoped for better.
Anyway, if you don't mind spending a little more time on this, I'd be
interested in seeing a breakdown of the amount of time spent on (1) locating
the match_results object in TLS, (2) parsing, and (3) semantic actions.
You could determine (1) by changing match_results to static (even though
this won't work in your actual case) and see what the time difference is.
Then if you comment out the semantic actions, you can determine the split
between parsing and semantic actions.
In any case, thanks for supplying a interesting test case of Xpressive in a