darc stands for Dynamic ARray Collection.
This repository currently hosts 3 variants :
mga(Macro Generated Array),
vpa(Void Pointer Array),
fpa(Fat Pointer Array)
The above are separately maintained and have their own READMEs.
The values of this project, in decreasing order of priority, are :
- Safety and correctness
- Simplicity and minimalism
- Performance and efficiency
The interface of these is somewhat uniform. The methods provided are :
create(), to allocate and initialize space.
destroy(), to free allocations and reset bookkeeping.
reserve(), ensure sufficient allocations for some number of elements.
insert(), insert some number of elements at some position into array.
selfinsert(), insert some number of elements from array at some position within itself.
remove(), remove some number of elements from some position in array.
shrink_to_fit(), free redundant allocations.
Performance varies by platform/compiler/usecase.
vpa are close,
fpa is slowest by a significant margin, all three are measurably faster than