I was profiling some code a while ago that makes extensive use of boost::variant and one of the lessons from the profiler run was that boost variants appear to be fairly expensive to construct and copy.

As of 1.53, variants support rvalue constructors and rvalue assignment operators. My initial measurements suggest that when used with types that are "move enabled", there is a benefit in upgrading to this version of boost variant, both in performance and memory consumption.

Sorry for the disruption, normal service will resume shortly

My apologies for the sudden instability of my blog. I've managed to make a hash of an update on the main Wordpress site when I tried to u...… Continue reading