fixedbitset
fixedbitset copied to clipboard
Return old values in `set` (and potentially other methods)
Potential performance optimization for a pattern like this:
if !received[id] {
received[id] = true;
// Do other stuff
}
// Could be this instead
if !received.set(id, true) {
// Do other stuff
}
It would need some benchmarking to make sure the bounds checking and division is actually slow enough to warrant a memory read on every set call.