diff options
| author | Renato Westphal <renato@opensourcerouting.org> | 2016-12-14 12:34:57 -0200 |
|---|---|---|
| committer | Renato Westphal <renato@opensourcerouting.org> | 2017-02-15 07:19:52 -0200 |
| commit | 7a09a2b1c4a888bd97b43bf5fc31383ca59e4352 (patch) | |
| tree | c921a48b479ada3597f626cbcaf589af32aa17dc /lib/json.c | |
| parent | 2db4e1fca180987dec09a165b2e064fa14a50298 (diff) | |
ldpd: use red-black trees to store 'l2vpn_if' 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
