mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 14:07:59 +00:00
Update Data structure survey
parent
9790948989
commit
d122a7f992
@ -57,6 +57,10 @@ Fixed-size array stack
|
|||||||
|
|
||||||
## notes
|
## notes
|
||||||
|
|
||||||
|
Used as object caches
|
||||||
|
|
||||||
|
Ondrej: will be gone after the netmgr refactoring and replaced with per-thread object pools/lists
|
||||||
|
|
||||||
Locked.
|
Locked.
|
||||||
|
|
||||||
|
|
||||||
@ -81,6 +85,7 @@ There's a min-heap in libuv, implemented as a binary tree. The
|
|||||||
standard algorithms (as in `isc/heap`) use an array which should have
|
standard algorithms (as in `isc/heap`) use an array which should have
|
||||||
better performance.
|
better performance.
|
||||||
|
|
||||||
|
Ondrej: The usage in isc_timer has been already removed in the loopmgr branch
|
||||||
|
|
||||||
# `isc/ht`
|
# `isc/ht`
|
||||||
|
|
||||||
@ -120,6 +125,11 @@ Case-sensitive and case-insensitive variants, chosen at run-time.
|
|||||||
Uses chaining, so it is heavy on indirection and heavy on allocation.
|
Uses chaining, so it is heavy on indirection and heavy on allocation.
|
||||||
Modern hash tables use open addressing.
|
Modern hash tables use open addressing.
|
||||||
|
|
||||||
|
Ondrej: there's work to do on the isc_ht:
|
||||||
|
|
||||||
|
1. make header-only variant of the hashtable, so we can unify the usage across the codebase (e.g. no extra allocations when storing item)
|
||||||
|
2. there's a branch, where I implemented robin-hood hashing, but I never finished because of 1)
|
||||||
|
3. the resizing was added only recently, we still miss shrinking (should be easy enough to do)
|
||||||
|
|
||||||
# `isc/pool`
|
# `isc/pool`
|
||||||
|
|
||||||
@ -138,6 +148,7 @@ This is a bit different from the lock pools in `rbtdb`, because
|
|||||||
`isc/pool` returns a random item from teh pool, whereas `rbtdb`
|
`isc/pool` returns a random item from teh pool, whereas `rbtdb`
|
||||||
chooses `locknum` deterministically based on the node's hash value.
|
chooses `locknum` deterministically based on the node's hash value.
|
||||||
|
|
||||||
|
Ondrej: this is already gone on main
|
||||||
|
|
||||||
# `isc/radix`
|
# `isc/radix`
|
||||||
|
|
||||||
@ -181,6 +192,7 @@ Ought to be unnecessary. Might be worth cleaning up as part of some
|
|||||||
general parser refactoring (`isc/lex` could probably be made faster
|
general parser refactoring (`isc/lex` could probably be made faster
|
||||||
using `re2c`).
|
using `re2c`).
|
||||||
|
|
||||||
|
Ondrej: Using [rage](http://www.colm.net/open-source/ragel/) is on my TODO list for too long...
|
||||||
|
|
||||||
# `isc/taskpool`
|
# `isc/taskpool`
|
||||||
|
|
||||||
@ -200,6 +212,7 @@ like that was the plan when `isc/pool` was added).
|
|||||||
There appears to be a bug in `isc_taskpool_expand()` when it fails to
|
There appears to be a bug in `isc_taskpool_expand()` when it fails to
|
||||||
create a new task: the existing taskpool will be left empty.
|
create a new task: the existing taskpool will be left empty.
|
||||||
|
|
||||||
|
Ondrej: this is already gone on main
|
||||||
|
|
||||||
# `isccc`
|
# `isccc`
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user