
22 Apr
2004
22 Apr
'04
3:22 a.m.
Playing with a Spirit-based parser for a simple scripting language I noticed that #defining BOOST_DISABLE_THREADS resulted in a parser that was nearly 3 times faster. For reasons that aren't relevant to the discussion, this had to be an MT build, but the parser didn't need thread safety. That made me wonder though: If I #define BOOST_DISABLE_THREADS in some translation units but not in others, what's going to happen? I suppose one way of summarizing it is this: does BOOST_DISABLE_THREADS change the type of shared_ptr that's made? If not, that seems like a rather serious problem to me - especially given the enormous difference in performance that I measured (optimized build with VC8 alpha). What obvious thing am I overlooking? -cd