Hi,

The frequent heap usage of boost::any was problematic to me for small object sizes. So I made a small tweak in boost::any which provides inline allocation of objects smaller than a certain template defined size. It practically eliminated the performance overhead of heap allocation and deallocation in my project while providing all benefits of boost::any.

You can see the changed file at http://gitorious.org/athi/athi/blobs/master/core/any.hpp

It is not cleaned up, but I thought it worthwhile to have any comments from somebody who solved the same problem.

Thanks,
Adarsh