Why are you using a roll-your-own system instead of boost::shared_ptr for the copy-on-write stuff?

Because it's a lot faster. I tried boost::shared_ptr, and under Linux with GCC 4.4.1 on the same computer, running my test suite went from 1.6 seconds to 3.4 seconds. The home-grown shared pointer design may not be quite as easy to work with in an exception-safe manner, but that's completely internal to the integer classes, so only developers working on the library, rather than with it, have to deal with that. I'll accept that trade-off.


© Copyright Chad Nelson, 2010-2011. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)