diff options
| author | Renato Westphal <renato@opensourcerouting.org> | 2016-12-14 09:14:52 -0200 |
|---|---|---|
| committer | Renato Westphal <renato@opensourcerouting.org> | 2017-02-15 07:19:52 -0200 |
| commit | c485351c5222f0e1106709d77329597d30165a03 (patch) | |
| tree | 4faa190e4e84c83140a217b6d08258af1d847c4d /lib/json.c | |
| parent | 29f6e7acbe3309bf91e4666db6952512baed3ee0 (diff) | |
ldpd: use red-black trees to store 'nbr_params' 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
