msm/doc/HTML/ch04s02.html
2014-10-12 21:54:37 +02:00

14 lines
2.9 KiB
HTML

<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<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&nbsp;4.&nbsp; Performance / Compilers"><link rel="prev" href="ch04.html" title="Chapter&nbsp;4.&nbsp; 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>&nbsp;</td><th width="60%" align="center">Chapter&nbsp;4.&nbsp; Performance / Compilers</th><td width="20%" align="right">&nbsp;<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
compilers I tested disagree with this claim. On VC9, the test state machines
used in the performance section produce executables of 14kB (for simple and
eUML) and 21kB (for the composite). This includes the test code and iostreams.
By comparison, an empty executable with iostreams generated by VC9 has a size of
7kB. Boost.Statechart generates executables of 43kB and 54kB. As a bonus, eUML
comes for &#8220;free&#8221; in terms of executable size. You even get a speed gain. With
g++ 4.3, it strongly depends on the compiler options (much more than VC). A good
size state machine with &#8211;O3 can generate an executable of 600kB, and with eUML
you can get to 1.5MB. Trying with &#8211;Os &#8211;s I come down to 18kB and 30kB for the
test state machines, while eUML will go down to 1MB (which is still big), so in
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>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="ch04.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="ch04s03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter&nbsp;4.&nbsp; Performance / Compilers&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;Supported compilers</td></tr></table></div></body></html>