Re:A lot of complex “scalable” systems can be done with a si...
by rumanator on Monday December 30, 2019 @03:20AM
(#21911670)
To be fair, std::shared_ptr is just a high-level component that's a part of the STL. Although it's defined in the C++ standard, it's just a generic shared pointer implementation designed to be as robust and bullet-proof as possible.
As with everything in the C++ STL, if you care about bleeding edge performance then you should be prepared to use more perform any (and less generic) components, whether it's data structure implementations or shared pointers.
This means people frequently need to reinvent their own reference counting mechanisms.
Rust does this right. Rc and Arc.