2 <meta http-equiv=
"Content-Type" content=
"text/html; charset=ISO-8859-1">
3 <title>Executable size
</title><link rel=
"stylesheet" href=
"boostbook.css" type=
"text/css"><meta name=
"generator" content=
"DocBook XSL-NS Stylesheets V1.75.2"><link rel=
"home" href=
"index.html" title=
"Meta State Machine (MSM)"><link rel=
"up" href=
"ch04.html" title=
"Chapter 4. Performance / Compilers"><link rel=
"prev" href=
"ch04.html" title=
"Chapter 4. Performance / Compilers"><link rel=
"next" href=
"ch04s03.html" title=
"Supported compilers"></head><body bgcolor=
"white" text=
"black" link=
"#0000FF" vlink=
"#840084" alink=
"#0000FF"><div class=
"navheader"><table width=
"100%" summary=
"Navigation header"><tr><th colspan=
"3" align=
"center">Executable size
</th></tr><tr><td width=
"20%" align=
"left"><a accesskey=
"p" href=
"ch04.html">Prev
</a> </td><th width=
"60%" align=
"center">Chapter
4.
Performance / Compilers
</th><td width=
"20%" align=
"right"> <a accesskey=
"n" href=
"ch04s03.html">Next
</a></td></tr></table><hr></div><div class=
"sect1" title=
"Executable size"><div class=
"titlepage"><div><div><h2 class=
"title" style=
"clear: both"><a name=
"d0e2816"></a>Executable size
</h2></div></div></div><p>There are some worries that MSM generates huge code. Is it true? The
2
4 compilers I tested disagree with this claim. On VC9, the test state machines
5 used in the performance section produce executables of
14kB (for simple and
6 eUML) and
21kB (for the composite). This includes the test code and iostreams.
7 By comparison, an empty executable with iostreams generated by VC9 has a size of
8 7kB. Boost.Statechart generates executables of
43kB and
54kB. As a bonus, eUML
9 comes for
“free
” in terms of executable size. You even get a speed gain. With
10 g++
4.3, it strongly depends on the compiler options (much more than VC). A good
11 size state machine with
–O3 can generate an executable of
600kB, and with eUML
12 you can get to
1.5MB. Trying with
–Os
–s I come down to
18kB and
30kB for the
13 test state machines, while eUML will go down to
1MB (which is still big), so in
14 this case eUML does not come for free.
</p></div><div class=
"navfooter"><hr><table width=
"100%" summary=
"Navigation footer"><tr><td width=
"40%" align=
"left"><a accesskey=
"p" href=
"ch04.html">Prev
</a> </td><td width=
"20%" align=
"center"><a accesskey=
"u" href=
"ch04.html">Up
</a></td><td width=
"40%" align=
"right"> <a accesskey=
"n" href=
"ch04s03.html">Next
</a></td></tr><tr><td width=
"40%" align=
"left" valign=
"top">Chapter
4.
Performance / Compilers
</td><td width=
"20%" align=
"center"><a accesskey=
"h" href=
"index.html">Home
</a></td><td width=
"40%" align=
"right" valign=
"top"> Supported compilers
</td></tr></table></div></body></html>