Back to 2015-proposals
Title: C++ Container Design
Proposer: Lance Diduck
Type: Case Study
Duration: 90 mins
Description:
I will present two novel containers, zip_vector and assoc_vector, and walk through many of the design issues.
The first, zip_vector, is API equivalent to std::vector<std::tuple<X,Y,….>,A=std::allocator< std::tuple<X,Y,….»>. The difference is that it stores the tuple members as columns, i.e. there is a vector for each element of the tuple.
The second, assoc_vector, is API equivalent to std::map<K, std::tuple<X,Y,….>,Cmp, Alloc>, it also stores its values as columns.
Design issues:
1. Python bindings (assoc_vector is like a dict, zip_vector a list of tuples)
2. Iterator construction (how *begin() is a std::tuple<X,Y,…> from multiple underlying containers )
3. Tradeoffs between the traditional “rows” and using columns (vectorization, cache performance)
4. Use of containers with alternate allocators (like shared_memory)
5. STL conformance