1<html> 2<head> 3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 4<title>Performance</title> 5<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css"> 6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> 7<link rel="home" href="../index.html" title="Chapter 1. Coroutine"> 8<link rel="up" href="../index.html" title="Chapter 1. Coroutine"> 9<link rel="prev" href="stack/valgrind.html" title="Support for valgrind"> 10<link rel="next" href="architectures.html" title="Architectures"> 11</head> 12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> 13<table cellpadding="2" width="100%"><tr> 14<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td> 15<td align="center"><a href="../../../../../index.html">Home</a></td> 16<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td> 17<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> 18<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> 19<td align="center"><a href="../../../../../more/index.htm">More</a></td> 20</tr></table> 21<hr> 22<div class="spirit-nav"> 23<a accesskey="p" href="stack/valgrind.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="architectures.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> 24</div> 25<div class="section"> 26<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 27<a name="coroutine.performance"></a><a class="link" href="performance.html" title="Performance">Performance</a> 28</h2></div></div></div> 29<p> 30 Performance of <span class="bold"><strong>Boost.Coroutine</strong></span> was measured 31 on the platforms shown in the following table. Performance measurements were 32 taken using <code class="computeroutput"><span class="identifier">rdtsc</span></code> and <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">high_resolution_clock</span></code>, 33 with overhead corrections, on x86 platforms. In each case, cache warm-up was 34 accounted for, and the one running thread was pinned to a single CPU. 35 </p> 36<div class="table"> 37<a name="coroutine.performance.performance_of_asymmetric_coroutines"></a><p class="title"><b>Table 1.1. Performance of asymmetric coroutines</b></p> 38<div class="table-contents"><table class="table" summary="Performance of asymmetric coroutines"> 39<colgroup> 40<col> 41<col> 42<col> 43<col> 44<col> 45</colgroup> 46<thead><tr> 47<th> 48 <p> 49 Platform 50 </p> 51 </th> 52<th> 53 <p> 54 switch 55 </p> 56 </th> 57<th> 58 <p> 59 construction (protected stack-allocator) 60 </p> 61 </th> 62<th> 63 <p> 64 construction (preallocated stack-allocator) 65 </p> 66 </th> 67<th> 68 <p> 69 construction (standard stack-allocator) 70 </p> 71 </th> 72</tr></thead> 73<tbody> 74<tr> 75<td> 76 <p> 77 i386 (AMD Athlon 64 DualCore 4400+, Linux 32bit) 78 </p> 79 </td> 80<td> 81 <p> 82 49 ns / 50 cycles 83 </p> 84 </td> 85<td> 86 <p> 87 51 µs / 51407 cycles 88 </p> 89 </td> 90<td> 91 <p> 92 14 µs / 15231 cycles 93 </p> 94 </td> 95<td> 96 <p> 97 14 µs / 15216 cycles 98 </p> 99 </td> 100</tr> 101<tr> 102<td> 103 <p> 104 x86_64 (Intel Core2 Q6700, Linux 64bit) 105 </p> 106 </td> 107<td> 108 <p> 109 12 ns / 39 cycles 110 </p> 111 </td> 112<td> 113 <p> 114 16 µs / 41802 cycles 115 </p> 116 </td> 117<td> 118 <p> 119 6 µs / 10350 cycles 120 </p> 121 </td> 122<td> 123 <p> 124 6 µs / 18817 cycles 125 </p> 126 </td> 127</tr> 128</tbody> 129</table></div> 130</div> 131<br class="table-break"><div class="table"> 132<a name="coroutine.performance.performance_of_symmetric_coroutines"></a><p class="title"><b>Table 1.2. Performance of symmetric coroutines</b></p> 133<div class="table-contents"><table class="table" summary="Performance of symmetric coroutines"> 134<colgroup> 135<col> 136<col> 137<col> 138<col> 139<col> 140</colgroup> 141<thead><tr> 142<th> 143 <p> 144 Platform 145 </p> 146 </th> 147<th> 148 <p> 149 switch 150 </p> 151 </th> 152<th> 153 <p> 154 construction (protected stack-allocator) 155 </p> 156 </th> 157<th> 158 <p> 159 construction (preallocated stack-allocator) 160 </p> 161 </th> 162<th> 163 <p> 164 construction (standard stack-allocator) 165 </p> 166 </th> 167</tr></thead> 168<tbody> 169<tr> 170<td> 171 <p> 172 i386 (AMD Athlon 64 DualCore 4400+, Linux 32bit) 173 </p> 174 </td> 175<td> 176 <p> 177 47 ns / 49 cycles 178 </p> 179 </td> 180<td> 181 <p> 182 27 µs / 28002 cycles 183 </p> 184 </td> 185<td> 186 <p> 187 98 ns / 116 cycles 188 </p> 189 </td> 190<td> 191 <p> 192 319 ns / 328 cycles 193 </p> 194 </td> 195</tr> 196<tr> 197<td> 198 <p> 199 x86_64 (Intel Core2 Q6700, Linux 64bit) 200 </p> 201 </td> 202<td> 203 <p> 204 10 ns / 33 cycles 205 </p> 206 </td> 207<td> 208 <p> 209 10 µs / 22828 cycles 210 </p> 211 </td> 212<td> 213 <p> 214 42 ns / 710 cycles 215 </p> 216 </td> 217<td> 218 <p> 219 135 ns / 362 cycles 220 </p> 221 </td> 222</tr> 223</tbody> 224</table></div> 225</div> 226<br class="table-break"> 227</div> 228<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 229<td align="left"></td> 230<td align="right"><div class="copyright-footer">Copyright © 2009 Oliver Kowalke<p> 231 Distributed under the Boost Software License, Version 1.0. (See accompanying 232 file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) 233 </p> 234</div></td> 235</tr></table> 236<hr> 237<div class="spirit-nav"> 238<a accesskey="p" href="stack/valgrind.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="architectures.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> 239</div> 240</body> 241</html> 242