[patch] Reduce space and time overhead of std::thread
Jonathan Wakely
jwakely@redhat.com
Wed Sep 23 16:18:00 GMT 2015
For PR 65393 I avoided some unnecessary shared_ptr copies while
launching a std::thread. This goes further and avoids shared_ptr
entirely, using unique_ptr instead. This reduces the memory overhead
of a std::thread by 32 bytes (on 64-bit) and avoids any
reference-count updates.
The downside is it exports some new symbols, and we have to keep the
old code for backwards compatibility, but I think it's worth doing.
Does anybody disagree?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.txt
Type: text/x-patch
Size: 7891 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20150923/960a5b8a/attachment.bin>
More information about the Libstdc++
mailing list