You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[...]
C++ "ref-counted" (shared_ptr) has significant performance hit on non-Linux platforms.
Apparently, libstdc++ contains an optimization for shared_ptr<T> whereby it is able to fall back to a non-atomic reference count if it detects the absence of pthreads (source: http://snf.github.io/2019/02/13/shared-ptr-optimization/).
This could explain the performance disparity between different platforms. Should the C++ build(s) link to pthreads to disable this optimization?
The text was updated successfully, but these errors were encountered:
From the README...
Apparently, libstdc++ contains an optimization for
shared_ptr<T>
whereby it is able to fall back to a non-atomic reference count if it detects the absence of pthreads (source: http://snf.github.io/2019/02/13/shared-ptr-optimization/).This could explain the performance disparity between different platforms. Should the C++ build(s) link to pthreads to disable this optimization?
The text was updated successfully, but these errors were encountered: