ddl.ExpContainer

Array wrapper template that provides exponential reserve characteristics for tuning purposes.

struct ExpContainer(T);
Exponential reserve array template.

At times, the memory reserve behavior of the GC can actually create a very large number of temporaries within the memory pool. In such cases, overriding this behavior by creating an artifical reserve can yield dramatic improvments in memory consumption and performance.

This container is optimized for opCatAssign() operations, as it will attempt to store elements into its reserve space before reallocating.

Reallocation is performed by doubling the size of the reserve array each time the reserve is exhausted. Therefore, the developer must be very careful to only apply this container under small memory usage scenarios.

TODO:

use malloc()/realloc() here instead of new/GC.

TODO:

set gc.scanRoot() for BaseType.sizeof >= ptr_t.sizeof