diff options
| author | Rafael Zalamena <rzalamena@gmail.com> | 2017-06-16 10:44:31 -0300 |
|---|---|---|
| committer | Rafael Zalamena <rzalamena@gmail.com> | 2017-06-16 10:44:31 -0300 |
| commit | 45926e58749924a6ff207cf211de3e6457578ecc (patch) | |
| tree | 36fc6b1e0f38826a3cc809e77e39d54c0588832a /lib/json.c | |
| parent | f43cd318b26a3dc57a0e6f40bcccdd5ce1886432 (diff) | |
lib: improve the RB implementation
Switch the RB tree implementation completely to the new dlg@'s version
that uses pre-declared functions instead of macros for tree functions.
Original e-mail/diff:
https://marc.info/?l=openbsd-tech&m=147087487111068&w=2
Pros:
* Reduces the amount of code that the usage of those macros generate
* Allows the compiler to do a better compile-time check job
* Might have better i-cache utilization since the tree code is shared
Con:
* dlg@ benchmarks shows it has 'very slightly slower' insertions
* imported RB_* code must adapt the following calls:
RB_INIT(), RB_GENERATE(), RB_ROOT(), RB_EMPTY(), make compare
functions use 'const' (if not already) and maybe others.
Diffstat (limited to 'lib/json.c')
0 files changed, 0 insertions, 0 deletions
