diff options
| author | Renato Westphal <renato@opensourcerouting.org> | 2016-12-03 21:14:44 -0200 |
|---|---|---|
| committer | Renato Westphal <renato@opensourcerouting.org> | 2017-01-03 22:07:13 -0200 |
| commit | d3e1887ad6b5ae2199710b3278c277838e6ef913 (patch) | |
| tree | 36470ff324cefc0af07208863ec81f5e805f48c6 /ldpd/ldp_debug.c | |
| parent | 607c1cbfd290e4e19c983c43dae22bd9a0ab827f (diff) | |
ldpd: use red-black trees to store 'lde_map' elements
Using red-black trees instead of linked lists brings the following
benefits:
1 - Elements are naturally ordered (no need to reorder anything before
outputting data to the user);
2 - Faster lookups/deletes: O(log n) time complexity against O(n).
The insert operation with red-black trees is more expensive though,
but that's not a big issue since lookups are much more frequent.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'ldpd/ldp_debug.c')
0 files changed, 0 insertions, 0 deletions
