Skip to Main Content
A Bloom filter is a succinct data structure for membership queries. While the filter enables a compact storage, it allows false positives when queried and exhibits an inherent tradeoff between the false positive rate and space complexity. Among many applications, IP address lookup shows promise for improvement using on-chip Bloom filters; however, high false positive rates may cause more off-chip memory access and degrade the performance significantly. We introduce a new Bloom filter called the length-aware Bloom filter (LABF) for multiple pattern matching problems. The primary idea is to explore the discrepancy in length distribution between the set of patterns and the set of prefixes of input text that are examined against the patterns. While maintaining the simplicity, LABFs outperform the standard Bloom filter when the pattern lengths are nonuniformly distributed in a wide range. Such pattern length distributions frequently occur in multiple pattern matching, e.g., longest prefix matching in IP address lookup. We derive a simple formula to configure parameters for the construction of an LABF and provide a provable guarantee for the average number of false positives. Our experimental results show that LABFs reduce the average false positive rates by a factor of 4 and 16, for IPv4 and IPv6, respectively.