]> granicus.if.org Git - pdns/commit
Store NetmaskTree nodes in a set for faster removal
authorRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 12 Sep 2018 11:21:10 +0000 (13:21 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 3 Oct 2018 07:56:09 +0000 (09:56 +0200)
commit462dd712b987df83af2860e04937c67b414e89b2
treec61cc147cedc74e82c1ebed37e5d654e15c2ef07
parentc2897aba1932aa1e3ce8f10aad8fc072c221fe6e
Store NetmaskTree nodes in a set for faster removal

The insertion is a bit slower as a result (~ +25%) but removal is
much, much more faster for large sets as it was O(n) previously.
Walking all the entries might be a bit slower as well, but this
change has no impact on the lookup speed, which is the critical
point for the NMT.
pdns/iputils.hh
pdns/test-iputils_hh.cc