3 ms·
Why?
by steveklabnik 8y ago
Why?
- superpermutat0r 8y agoIn my experience, almost every case of trying to replace arrays with bitsets resulted in worse performance. Indexing arrays is definitely faster. Bitsets also do array indexing but have to target particular bits too. If I want to index 1309402 bit, I have to calculate where it is in memory, for an array representing a bit, it's super quick. Rarely have I encountered that memory occupied by an array is a bottleneck.