David Gwynne wrote:
> i recently proposed replacing a hash with an rb tree somewhere in
> the network stack, but it was pointed out that rb trees are big.
> 
> in hindsight i think the other person was talking about the size
> of an RB_ENTRY inside each thing you're tracking, but it made me
> look at the code size of rb trees again. it turns out on amd64 its
> about 2.5k of code per type of rb tree. a type being each RB_ENTRY
> inside a particular struct. ie, if a struct has two RB_ENTRYs in
> it, then it generates two chunks of code, one for each of them.

I love everything about this, but didn't actually look much at the diff or try
it out.

Reply via email to