https://issues.dlang.org/show_bug.cgi?id=17881
Rainer Schuetze <r.sagita...@gmx.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |r.sagita...@gmx.de --- Comment #5 from Rainer Schuetze <r.sagita...@gmx.de> --- A slightly simpler API could be to add allocating N same-sized chunks from the GC that returns them in a free-list-like chain. I agree with Andrei that we should not complicate the GC interface for every possible allocation pattern a user might want to optimize for, though. If you call GC.reserve(20_000_000*(Key.sizeof+Value.sizeof)) before inserting elements, there should be no collection while filling the AA. If we add thread local free-lists to the GC, the overhead of allocating these from the GC instead of caching them in the AA would be rather small. --