On 12/6/23 20:05, Chris M. Thomasson wrote:
Context:
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0233r5.pdf
SMR in std C++? Humm...
It will be based on the one in Meta's folly library. Based on a quick
scan of the code I think it will use a global membar if that is
available. Looks like it will do some tracing collection for acyclic
data structures.
I (finally) got around to writing the proxy version of it here
https://github.com/jseigh
smrproxy - hazard pointer based proxy collector
arcproxy - atomic reference counted proxy collector
proxytest - timing tests
atomic-ptr-plus - obsolete, not updated and missing some files during
the sourceforge to google to github moves.
Some timing comparisons in my blog here
https://threadnought.wordpress.com/2023/06/09/smrproxy-timing-comparisons/
arcproxy looks good compared to rwlock but compared to smrproxy it looks
really bad. The rcu timings are simulated.
I've been considering creating an interface for all the different
schemes. Not sure if it would be a c++ abstact class or a rust trait,
neither are my main languages. But then I would need a shared data
structure that would utilize it. I did figure out how to do a lock-free hashmap (w/ per bucket linked lists) that can do lock-free resizing but
I found Cliff Click has one that's probably faster (because no linked
lists). But all that's on back burner for now.
Joe Seigh
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)