Chrinkus / libcgs

A C library of data structures and algorithms
MIT License
1 stars 0 forks source link

Consider batch allocation strategy for RBT #10

Open Chrinkus opened 2 years ago

Chrinkus commented 2 years ago

One use case of my red-black tree had over 140k individual allocations. Would this structure be improved if it had an underlying batch allocation structure?

The array's solution to this is exponential growth but an array of node*'s would require reallocations and data movement. Perhaps a linked-list "pool" of progressively larger allocations?

Chrinkus commented 2 years ago

This leads into a larger discussion about containers taking allocator types.