The "threshold" counter is a clever idea for optimizing a very specific situation, but it's extremely odd that there's no mention of std::bitset in this article. That won't give you an O(1) reset time, but it'll be a whole lot faster than a vector of bools.<p>Specifically, vector<bool>::clear() is not at all equivalent to bitset::reset()