Make route operations execute in O(log n).
This changes the route table to be a sorted table of linked lists of routes to a given prefix, which makes most route operations behave in O(log n). Insertion and flushing of a prefix is still O(n), but these are fairly rare operations. A nice side-effect is that the route table is now private to route.c, which should make it easy to switch to a different data structure in the future.
Showing
This diff is collapsed.
Please register or sign in to comment