Collin Funk wrote:
> A red-black tree, for example, would probably fix the performance
> of get_memnode.

The relevant operations here are
  - adding an element,
  - removing an element,
where the element is a pointer to a memory block.

Why a red-black tree then, which has O(log N) for each of these operations?

Better use a hash set, which has O(1) for each of these operations, on average.

Bruno




Reply via email to