I made several optimizations to the Bloom filter code to enhance its performance and readability:
- Removed redundant calculations by precomputing frequently used values.
- Added early exits in loops to avoid unnecessary iterations.
- Retained efficient bitwise operations for setting and checking bits.
- Improved memory resizing for the
CRollingBloomFilter
by using bit shifts. - Simplified conditionals in the
IsRelevantAndUpdate
method for better clarity. - Improved comments to better explain the logic.