job / aggregate6

IPv4 and IPv6 prefix aggregation tool
BSD 2-Clause "Simplified" License
145 stars 19 forks source link

Make loop criteria for _aggregate_phase2 constant #12

Closed movatica closed 1 year ago

movatica commented 1 year ago

Instead of comparing the old and new trees to check if more aggregation is possible, simply count the number of aggregations that actually occured in the recent iteration. This reduces the break condition from O(k) to O(1).