https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111588
--- Comment #5 from Mathias Stearn ---
Mea culpa. The difference between boost and std was due to the code to
fast-path shared_ptrs that aren't actually shared:
https://github.com/gcc-mirror/gcc/blob/be34a8b538c0f04b11a428bd1a9340eb19dec13f/libs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111588
--- Comment #4 from Mathias Stearn ---
So even though I already knew in the back of my mind about how this can affect
benchmark results, I *still* got burned by it! I was benchmarking a simple
hazard pointer implementation against shared ptrs by
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111588
--- Comment #3 from Jonathan Wakely ---
If we do want to do it, I think we'd just need something like this (and docs):
--- a/libstdc++-v3/include/ext/atomicity.h
+++ b/libstdc++-v3/include/ext/atomicity.h
@@ -48,6 +48,8 @@ _GLIBCXX_BEGIN_NAMESP
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111588
--- Comment #2 from Jonathan Wakely ---
This needs numbers, not opinions.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111588
--- Comment #1 from Andrew Pinski ---
>for programs that know they are effectively always multithreaded they pay for
>a runtime branch and .text segment bloat for an optimization that never
>applies.
The bloat is not much and the overhead for