diff options
| author | Renato Westphal <renato@opensourcerouting.org> | 2016-12-03 21:14:44 -0200 |
|---|---|---|
| committer | Renato Westphal <renato@opensourcerouting.org> | 2017-02-15 07:19:52 -0200 |
| commit | 9b127e580474f6a075046f81d3228d3ed29421b3 (patch) | |
| tree | 092f80782a8a6b2896ad71b07b4deafeaa0bd337 /lib/json.c | |
| parent | 50c2e7c36d18c5359c12d8ab5cc6446394de9b73 (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 'lib/json.c')
0 files changed, 0 insertions, 0 deletions
