Slowness from thread-safe shared_ptr

Chris Jefferson chris@bubblescope.net
Tue Nov 6 14:45:00 GMT 2007


I recently mapped some code from my own implementation of shared_ptr
to the tr1 implementation, and found a quite disappointing level of
slowdown (~15%). Profiling seems to show this is entirely down to the
thread-safeness of shared_ptr. As I don't use threads, this is a bit
annoying. Is there a general way of turning off the thread safety, or
should I have to keep a separate stripped copy?

Chris



More information about the Libstdc++ mailing list