Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

Chapter 4.  Performance / Compilers

Table of Contents

Speed
Executable size
Supported compilers
Limitations
Compilers corner

Tests were made on different PCs running Windows XP and Vista and compiled with VC9 SP1 or Ubuntu and compiled with g++ 4.2 and 4.3. For these tests, the same player state machine was written using Boost.Statechart, as a state machine with only simple states and as a state machine with a composite state. The same simple and composite state machines are implemented with MSM with a standard frontend (simple)(composite), the simple one also with functors and with eUML. As these simple machines need no terminate/interrupt states, no message queue and have no-throw guarantee on their actions, the MSM state machines are defined with minimum functionality. Test machine is a Q6600 2.4GHz, Vista 64.

Speed

VC9:

  • The simple test completes 90 times faster with MSM than with Boost.Statechart

  • The composite test completes 25 times faster with MSM

gcc 4.2.3 (Ubuntu 8.04 in VMWare, same PC):

  • The simple test completes 46 times faster with MSM

  • The composite test completes 19 times faster with Msm