Opened 10 years ago
Last modified 10 years ago
#6829 new Bugs
[smart_ptr] make_shared is slower than shared_ptr(new) in MSVC
Reported by: | Owned by: | Peter Dimov | |
---|---|---|---|
Milestone: | To Be Determined | Component: | smart_ptr |
Version: | Boost Development Trunk | Severity: | Optimization |
Keywords: | smart_ptr make_shared | Cc: | mt.wizard@… |
Description
boost::make_shared() works much slower than it supposed to in MSVC It uses RTTI to get its custom deleter, and RTTI is painfully slow in MSVC.
Attachments (2)
Change History (4)
by , 10 years ago
Attachment: | make_shared_perf.patch added |
---|
comment:1 by , 10 years ago
Component: | None → smart_ptr |
---|---|
Owner: | set to |
Severity: | Problem → Optimization |
by , 10 years ago
Attachment: | make_shared.hpp added |
---|
Updated smart_ptr\make_shared.hpp file to look more like the original implementation and with sp_enable_shared_from_this calls that were missing in the patch.
comment:2 by , 10 years ago
Is there any way to remove attached file here? Please don't use the make_shared.hpp from attachment.
Note:
See TracTickets
for help on using tickets.
More optimal implementation of make_shared: don't use RTTI and don't store exptra pointer to allocated object as its position is know without it