Expand description
§IP Address Sets
This module provides the IpSet model, a high-performance container for managing
large collections of unique IP addresses.
§Performance Characteristics
IpSet uses a lazy normalization strategy. Insertions are $O(1)$ amortized,
as they simply push to an internal buffer. The set is sorted and merged ($O(N \log N)$)
only when a query method is called or when IpSet::canonicalize is invoked explicitly.
For maximum performance in multithreaded scanning:
- Build the set using
insert,extend, orFromIterator. - Call
IpSet::canonicalizeonce. - Use thread-safe query methods like
IpSet::contains_canonical.
Structs§
- IpSet
- A collection of unique IP addresses stored as sorted, non-overlapping ranges.
Enums§
- IpSet
Error - Errors that can occur when processing an
IpSet.