Which libraries use the "We Know Where You Live" optimization for std::make_shared?

Posted by KnowItAllWannabe on Stack Overflow See other posts from Stack Overflow or by KnowItAllWannabe
Published on 2014-05-27T03:22:32Z Indexed on 2014/05/27 3:24 UTC
Read the original article Hit count: 210

Filed under:
|
|
|
|

Over two years ago, Stephan T. Lavavej described a space-saving optimization he implemented in Microsoft's implementation of std::make_shared, and I know from speaking with him that Microsoft has nothing against other library implementations adopting this optimization. If you know for sure whether other libraries (e.g., for Gnu C++, Clang, Intel C++, plus Boost (for boost::make_shared)) have adopted this implementation, please contribute an answer. I don't have ready access to that many make_shared implementations, nor am I wild about digging into the bowels of the ones I have to see if they've implemented the WKWYL optimization, but I'm hoping that SO readers know the answers for some libraries off-hand. I know from looking at the code that as of Boost 1.52, the WKWYL optimization had not been implemented, but Boost is now up to version 1.55.

Note that this optimization is different from std::make_shared's ability to avoid a dedicated heap allocation for the reference count used by std::shared_ptr. For a discussion of the difference between WKWYL and that optimication, consult this question.

© Stack Overflow or respective owner

Related posts about c++

Related posts about optimization