diff options
| author | Renato Westphal <renato@opensourcerouting.org> | 2016-12-13 15:29:35 -0200 |
|---|---|---|
| committer | Renato Westphal <renato@opensourcerouting.org> | 2017-02-15 07:19:52 -0200 |
| commit | 39ec2dc9bb7d19262c264398cd1c9178fabb1862 (patch) | |
| tree | 8a917689a7fdc1a440f3a9e867e7e23cf5da6bfd /lib/json.c | |
| parent | 9b127e580474f6a075046f81d3228d3ed29421b3 (diff) | |
ldpd: use red-black trees to store 'iface' 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
