|
Boost : |
From: Mehrdad Niknami (mniknami_at_[hidden])
Date: 2021-01-04 12:17:00
Hi all,
Happy new year! New mailing list member here.
I've developed an STL-style stationary_vector class that retains elements
in-place when growing.
Very briefly, it is effectively a piecewise-contiguous vector, with the
following advantages over vector:
- Appending has O(1) overhead in the *worst* case (e.g., push_back() does
not move elements)
- Insertion and random-access can be done in parallel, as prior
iterators & references remain valid
This has a variety of benefits, including better UX (no "hiccups" due to
reallocations), and the ability to simplify parallel processing of
streaming data.
It occurred to me the larger C++ community might find this useful.
I was wondering if there would be interest in incorporating it into
Boost.Container, and if so, what steps I could take to make that happen?
I'm of course happy to discuss the design etc. with anyone who might be
interested.
Summary:
https://github.com/mehrdadn/libvital/blob/master/doc/vital/container/stationary_vector.md
Implementation:
https://github.com/mehrdadn/libvital/blob/master/include/vital/container/stationary_vector.hpp
Thank you,
Mehrdad
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk