A proof of concept of a semistable C++ vector container
1–10 of 10 posts
Re: A proof of concept of a semistable C++ vector container
#2Re: A proof of concept of a semistable C++ vector container
#3Re: A proof of concept of a semistable C++ vector container
#4Re: A proof of concept of a semistable C++ vector container
#5Re: A proof of concept of a semistable C++ vector container
#6What is the core use case for this structure? Because it seems like a very heavy price to pay just to keep value stable, as opposed to make a copy of that value when you need it.
This "semistable" vector appears to only do the "allow appending while iterating" part, but still maintains a contiguous buffer by periodically moving its contents.
Re: A proof of concept of a semistable C++ vector container
#7If I understand correctly:
thread safety random access stable iterators
------------- ------------- ----------------
std::list thread-compatible no yes
std::vector thread-compatible yes no
std::deque thread-compatible yes no
semistable::vector thread-unsafe yes yes
I think there are more times when I wanted concurrent reads and (random access OR stable iterators), than when I wanted both random access AND stable iterators but not concurrent reads. I wonder what's the intended application?Re: A proof of concept of a semistable C++ vector container
#8What is the core use case for this structure? Because it seems like a very heavy price to pay just to keep value stable, as opposed to make a copy of that value when you need it.
If the code here operates with a bit of data from some container, the container will ensure that this bit will persist until all references to it are gone even if the bit is removed from the container.
Depending on the datamodel this may be handy or even required. Consider some sort of hot-swappable code when both retired and new code versions running in parallel at some point. That sort of thing.
Re: A proof of concept of a semistable C++ vector container
#9Adorable: they've reinvented Emacs markers