TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Fast Resettable Flag Vector

7 pointsby crispweedover 10 years ago

1 comment

TillEover 10 years ago
The &quot;threshold&quot; counter is a clever idea for optimizing a very specific situation, but it&#x27;s extremely odd that there&#x27;s no mention of std::bitset in this article. That won&#x27;t give you an O(1) reset time, but it&#x27;ll be a whole lot faster than a vector of bools.<p>Specifically, vector&lt;bool&gt;::clear() is not at all equivalent to bitset::reset()
评论 #8419373 未加载