What's Changed
- Lookup index #13. The
db.lookup()can benefit from faster lookups with IPv4 index (an array of the first N bits of IPv4 addresses): it can skip the tree traversal for those bits. That can bring ~70%-140% speedup on sparse DBs and ~12%-18% on dense. db.open()anddb.mmap()now receivesReader.Optionsthat allows to build IPv4 indexdb.unmap()was removed in favor ofdb.close()- Lookup cache #14, see
lookupWithCache(). It showed ~15% faster GeoLite2-City.mmdb lookups on 1M random IPs (1.28M vs 1.47M lookups per second). within()was renamed toscan(), it doesn't cache anything internally. Nownext()returnsResultthat needs to be freed withresult.deinit()scanWithCache()was added to do network scans using a cache that owns the memory, i.e., no need to callresult.deinit()thoughcache.deinit()is needed to free the cache
Full Changelog: v0.5.0...v0.6.0