From dfd48621d1a54f2beb461fe3847fc4b2a535675e Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Wed, 17 Feb 2010 21:53:07 +0100 Subject: Replaces the algorithm for building balanced trees. Changes the time complexity of the algorithm from O(n^2) to O(n*log(n)). This speeds up loading of huge DEC-IX config from 128 s to 15 s. It also makes the code significantly simpler. --- filter/filter.h | 1 + 1 file changed, 1 insertion(+) (limited to 'filter/filter.h') diff --git a/filter/filter.h b/filter/filter.h index e526a79..11e0623 100644 --- a/filter/filter.h +++ b/filter/filter.h @@ -91,6 +91,7 @@ void f_prefix_get_bounds(struct f_prefix *px, int *l, int *h); void f_prefix_get_bounds(struct f_prefix *px, int *l, int *h); int val_compare(struct f_val v1, struct f_val v2); +int tree_compare(const void *p1, const void *p2); void val_print(struct f_val v); #define F_NOP 0 -- cgit v1.2.3