[Bug libstdc++/28587] vector<bool> is extremely slow (900x slower than it should be)

pcarlini at suse dot de gcc-bugzilla@gcc.gnu.org
Thu Aug 3 19:17:00 GMT 2006



------- Comment #3 from pcarlini at suse dot de  2006-08-03 19:16 -------
Hi. I think this specific issue can be (almost) fixed rather easily, by making
fill_insert smarter, that is slowly setting some bits of the previous and next
underlying unsigned long and then proceeding one unsigned long at a time,
instead of a bit at a time, like we do elesewhere in vector<bool>  (i.e.,
storing either 0 or ~0 at once).

By the way, I think Andrew has a point, maybe not clearly stated, in that all
the people actively working in the C++ Standard Commitee strongly dislike
vector<bool> for many reasons, and probably it will be deprecated in C++03 and
a replacement added. That implies, in turn, that it's not so easy to find
people willing to spend much time on (the various) implementations...


-- 

pcarlini at suse dot de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2006-08-03 19:16:59
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28587



More information about the Gcc-bugs mailing list