|
|
|
|
|
by throwaway894345
1754 days ago
|
|
> The point of the btree example is to test how good programming languages are at allocating tree-like structures that can't be preplanned. Forcing allocations for every node isn't justified by a desire to demonstrate dynamically sized binary trees. A naive dynamically-sized tree would just keep a list of node buffers and allocate a new node buffer every time the previous one fills up (perhaps with subsequent buffers doubling in size). The benchmark is, by all appearances, contrived to be slower. |
|
Cart before horse — the binary trees are justified by a desire to demonstrate memory allocation.
http://hboehm.info/gc/gc_bench/