Hi Maxim, > And here are the Intel VTune results (see the sources for details): > > Creation Assignment > struct 13383 27358 > boost::any 3846 331870 > TailoredAny<> 9151 310717 > TailoredAny<Loki::SmallObject> 3855 110022
IOW, TailoredAny behaves much worse on creation in default configuration. It behaves much better on assignment, in tuned configuration. Hmm.. Looking at your implementation, I still have two questions that I've already raised: 1. Why don't you specify allocator during assignment/creating. Why lift it to template parameter for any? 2. What happens when you copy any with custom allocator into any with default allocator. In your code, the allocators are retained on copy. This has a problem I've described previously --- if any is created in some library, then it's created with default allocators and there's nothing you can do about it... which somewhat reduces the gains. And, BTW, did you run tests on more than one compiler. The small objects optimization might be implemented in runtime library already. - Volodya _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost