On 2025-09-10 19:14, Collin Funk wrote:
A red-black tree, for example, would probably fix the performance
of get_memnode.

My thought is to not worry about it. If we head in that direction then next thing, we might want it to be thread-safe, and the thing after that, we might want it to be high-performance multithreaded, and before we know it we have lots more lines of code to maintain. That's overkill for this particular problem. Simplicity is good here, so let's just rely on the underlying libraries instead. And if that means we gotta use malloc and waste a page per allocation then let's do that.

Reply via email to