This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
On Mon, Oct 7, 2013 at 7:11 PM, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
> The version in your gist (which is *not* what your first patch did!)
> is faster for any size of _M_exists and any ratio of _M_states.size()
> / _M_exists.size():
Sorry for my original patch, I made a mistake! It's:
while (!_BaseT::empty())
_BaseT::pop_back();
but I truely meant:
while (!this->_M_empty())
this->_M_pop();
To make all trues reset.
In my machine the while loop is slower than assign() when the
_M_states.size() / _M_exists.size() is more than even 7/1000. so let's
keep the assign(), because the ratio in regex could probably be more
than 25%.
--
Tim Shen
Attachment:
a.patch
Description: Binary data
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |