shared_ptr: horrible speed
shared_ptr are the most complicated type of pointer ever: Ref counting takes time Multiple allocation (there are 3 parts: the object, the counter, the deleter) A number of virtual methods (in the counter and the deleter) for type erasure Works among multiple threads (thus synchronization) There are 2 ways to make them faster: use make_shared … Read more