diff options
| author | Renato Westphal <renato@opensourcerouting.org> | 2016-12-14 10:42:45 -0200 |
|---|---|---|
| committer | Renato Westphal <renato@opensourcerouting.org> | 2017-01-03 22:07:13 -0200 |
| commit | 90d7e7bd8b68530a80293e8d1c5c894c99b7a434 (patch) | |
| tree | 40babce40dc58d06fe8349c13abfd7a47f543a9c /lib/json.c | |
| parent | 76c4abd19f322288394be872c9198c7d17cfac10 (diff) | |
ldpd: use red-black trees to store 'l2vpn' 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
