Re: [PATCH] lib: test bitmap vs Maple Tree performance for region allocations

From: Matthew Wilcox

Date: Fri Jul 10 2026 - 23:49:44 EST


On Fri, Jul 10, 2026 at 09:39:09PM -0400, Yury Norov wrote:
> Compare the cost of allocating and freeing variable-sized regions using
> a bitmap and a Maple Tree. Both implementations process the same randomly
> generated sequence of region sizes, ranging from 1 to 32 entries, until
> the configured capacity is exhausted.

I'd suggest the IDA might be a better comparison than the maple tree.
Essentially it's a sparse bitmap which plays some fun tricks to lower
the cost.

Eventually, I expect the IDA to be reimplemented on top of the maple
tree data structure instead of the XArray.