1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 2<html> 3<head> 4<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 5<title>Performance</title> 6<link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css"> 7<meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> 8<link rel="home" href="../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset"> 9<link rel="up" href="../poly_collection.html" title="Chapter 28. Boost.PolyCollection"> 10<link rel="prev" href="tutorial.html" title="Tutorial"> 11<link rel="next" href="reference.html" title="Reference"> 12</head> 13<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> 14<table cellpadding="2" width="100%"><tr> 15<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../boost.png"></td> 16<td align="center"><a href="../../../index.html">Home</a></td> 17<td align="center"><a href="../../../libs/libraries.htm">Libraries</a></td> 18<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> 19<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> 20<td align="center"><a href="../../../more/index.htm">More</a></td> 21</tr></table> 22<hr> 23<div class="spirit-nav"> 24<a accesskey="p" href="tutorial.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../poly_collection.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="reference.html"><img src="../../../doc/src/images/next.png" alt="Next"></a> 25</div> 26<div class="section"> 27<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 28<a name="poly_collection.performance"></a><a class="link" href="performance.html" title="Performance">Performance</a> 29</h2></div></div></div> 30<div class="toc"><dl class="toc"> 31<dt><span class="section"><a href="performance.html#poly_collection.performance.container_definitions">Container 32 definitions</a></span></dt> 33<dt><span class="section"><a href="performance.html#poly_collection.performance.insertion_tests">Insertion 34 tests</a></span></dt> 35<dt><span class="section"><a href="performance.html#poly_collection.performance.processing_tests">Processing 36 tests</a></span></dt> 37</dl></div> 38<p> 39 (Testing program at <a href="../../../libs/poly_collection/example/perf.cpp" target="_top"><code class="computeroutput"><span class="identifier">perf</span><span class="special">.</span><span class="identifier">cpp</span></code></a>.) 40 </p> 41<p> 42 We ran tests to measure the performance of the containers of Boost.PolyCollection 43 in two scenarios: 44 </p> 45<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 46<li class="listitem"> 47 Insertion of elements. 48 </li> 49<li class="listitem"> 50 Linear traversal and processing with <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">for_each</span></code> 51 and <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">poly_collection</span><span class="special">::</span><span class="identifier">for_each</span></code> (with and without <a class="link" href="tutorial.html#poly_collection.tutorial.algorithms.type_restitution" title="Type restitution">type 52 restitution</a>). 53 </li> 54</ul></div> 55<p> 56 As a comparison baseline we used containers and facilities from the standard 57 library and Boost (details below). Tests were run in the following environments: 58 </p> 59<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 60<li class="listitem"> 61 <span class="bold"><strong>Visual Studio 2015 x86</strong></span>: Visual C++ 2015 62 in 32-bit (x86) release mode, Windows 7 64-bit, Intel Core i5-2520M @2.5GHz 63 </li> 64<li class="listitem"> 65 <span class="bold"><strong>Visual Studio 2015 x64</strong></span>: Visual C++ 2015 66 in 64-bit (x64) release mode, same machine 67 </li> 68<li class="listitem"> 69 <span class="bold"><strong>GCC 6.3 x64</strong></span>: GCC 6.3 release mode, Xubuntu 70 17.04 x64, Intel Core i7-5820 @3.3GHz 71 </li> 72<li class="listitem"> 73 <span class="bold"><strong>Clang 4.0 x64</strong></span>: Clang 4.0 release mode, 74 same machine 75 </li> 76</ul></div> 77<div class="section"> 78<div class="titlepage"><div><div><h3 class="title"> 79<a name="poly_collection.performance.container_definitions"></a><a class="link" href="performance.html#poly_collection.performance.container_definitions" title="Container definitions">Container 80 definitions</a> 81</h3></div></div></div> 82<div class="toc"><dl class="toc"> 83<dt><span class="section"><a href="performance.html#poly_collection.performance.container_definitions.boost_base_collection"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">base_collection</span></code></a></span></dt> 84<dt><span class="section"><a href="performance.html#poly_collection.performance.container_definitions.boost_function_collection"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">function_collection</span></code></a></span></dt> 85<dt><span class="section"><a href="performance.html#poly_collection.performance.container_definitions.boost_any_collection"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">any_collection</span></code></a></span></dt> 86</dl></div> 87<div class="section"> 88<div class="titlepage"><div><div><h4 class="title"> 89<a name="poly_collection.performance.container_definitions.boost_base_collection"></a><a class="link" href="performance.html#poly_collection.performance.container_definitions.boost_base_collection" title="boost::base_collection"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">base_collection</span></code></a> 90</h4></div></div></div> 91<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 92<li class="listitem"> 93 Baseline container: <code class="computeroutput"><span class="identifier">ptr_vector</span></code> 94 = <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">ptr_vector</span><span class="special"><</span><span class="identifier">base</span><span class="special">></span></code> 95 </li> 96<li class="listitem"> 97 Polymorphic collection: <code class="computeroutput"><span class="identifier">base_collection</span></code> 98 = <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">base_collection</span><span class="special"><</span><span class="identifier">base</span><span class="special">></span></code> 99 </li> 100<li class="listitem"> 101 Element types: <code class="computeroutput"><span class="identifier">T1</span></code> = 102 <code class="computeroutput"><span class="identifier">derived1</span></code>, <code class="computeroutput"><span class="identifier">T2</span></code> = <code class="computeroutput"><span class="identifier">derived2</span></code>, 103 <code class="computeroutput"><span class="identifier">T3</span></code> = <code class="computeroutput"><span class="identifier">derived3</span></code> 104 </li> 105</ul></div> 106<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">base</span> 107<span class="special">{</span> 108 <span class="keyword">virtual</span> <span class="special">~</span><span class="identifier">base</span><span class="special">()=</span><span class="keyword">default</span><span class="special">;</span> 109 <span class="keyword">virtual</span> <span class="keyword">int</span> <span class="keyword">operator</span><span class="special">()(</span><span class="keyword">int</span><span class="special">)</span><span class="keyword">const</span><span class="special">=</span><span class="number">0</span><span class="special">;</span> 110<span class="special">};</span> 111 112<span class="keyword">struct</span> <span class="identifier">derived1</span> <span class="identifier">final</span><span class="special">:</span><span class="identifier">base</span> 113<span class="special">{</span> 114 <span class="identifier">derived1</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">n</span><span class="special">):</span><span class="identifier">n</span><span class="special">{</span><span class="identifier">n</span><span class="special">}{}</span> 115 <span class="keyword">virtual</span> <span class="keyword">int</span> <span class="keyword">operator</span><span class="special">()(</span><span class="keyword">int</span><span class="special">)</span><span class="keyword">const</span><span class="special">{</span><span class="keyword">return</span> <span class="identifier">n</span><span class="special">;}</span> 116 117 <span class="keyword">int</span> <span class="identifier">n</span><span class="special">;</span> 118<span class="special">};</span> 119 120<span class="keyword">struct</span> <span class="identifier">derived2</span> <span class="identifier">final</span><span class="special">:</span><span class="identifier">base</span> 121<span class="special">{</span> 122 <span class="identifier">derived2</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">n</span><span class="special">):</span><span class="identifier">n</span><span class="special">{</span><span class="identifier">n</span><span class="special">}{}</span> 123 <span class="keyword">virtual</span> <span class="keyword">int</span> <span class="keyword">operator</span><span class="special">()(</span><span class="keyword">int</span> <span class="identifier">x</span><span class="special">)</span><span class="keyword">const</span><span class="special">{</span><span class="keyword">return</span> <span class="identifier">x</span><span class="special">*</span><span class="identifier">n</span><span class="special">;}</span> 124 125 <span class="keyword">int</span> <span class="identifier">unused</span><span class="special">,</span><span class="identifier">n</span><span class="special">;</span> 126<span class="special">};</span> 127 128<span class="keyword">struct</span> <span class="identifier">derived3</span> <span class="identifier">final</span><span class="special">:</span><span class="identifier">base</span> 129<span class="special">{</span> 130 <span class="identifier">derived3</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">n</span><span class="special">):</span><span class="identifier">n</span><span class="special">{</span><span class="identifier">n</span><span class="special">}{}</span> 131 <span class="keyword">virtual</span> <span class="keyword">int</span> <span class="keyword">operator</span><span class="special">()(</span><span class="keyword">int</span> <span class="identifier">x</span><span class="special">)</span><span class="keyword">const</span><span class="special">{</span><span class="keyword">return</span> <span class="identifier">x</span><span class="special">*</span><span class="identifier">x</span><span class="special">*</span><span class="identifier">n</span><span class="special">;}</span> 132 133 <span class="keyword">int</span> <span class="identifier">unused</span><span class="special">,</span><span class="identifier">n</span><span class="special">;</span> 134<span class="special">};</span> 135</pre> 136</div> 137<div class="section"> 138<div class="titlepage"><div><div><h4 class="title"> 139<a name="poly_collection.performance.container_definitions.boost_function_collection"></a><a class="link" href="performance.html#poly_collection.performance.container_definitions.boost_function_collection" title="boost::function_collection"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">function_collection</span></code></a> 140</h4></div></div></div> 141<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 142<li class="listitem"> 143 Baseline container: <code class="computeroutput"><span class="identifier">func_vector</span></code> 144 = <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">function</span><span class="special"><</span><span class="keyword">int</span><span class="special">(</span><span class="keyword">int</span><span class="special">)>></span></code> 145 </li> 146<li class="listitem"> 147 Polymorphic collection: <code class="computeroutput"><span class="identifier">function_collection</span></code> 148 = <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">function_collection</span><span class="special"><</span><span class="keyword">int</span><span class="special">(</span><span class="keyword">int</span><span class="special">)></span></code> 149 </li> 150<li class="listitem"> 151 Element types: <code class="computeroutput"><span class="identifier">T1</span></code> = 152 <code class="computeroutput"><span class="identifier">concrete1</span></code>, <code class="computeroutput"><span class="identifier">T2</span></code> = <code class="computeroutput"><span class="identifier">concrete2</span></code>, 153 <code class="computeroutput"><span class="identifier">T3</span></code> = <code class="computeroutput"><span class="identifier">concrete3</span></code> 154 </li> 155</ul></div> 156<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">concrete1</span> 157<span class="special">{</span> 158 <span class="identifier">concrete1</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">n</span><span class="special">):</span><span class="identifier">n</span><span class="special">{</span><span class="identifier">n</span><span class="special">}{}</span> 159 <span class="keyword">int</span> <span class="keyword">operator</span><span class="special">()(</span><span class="keyword">int</span><span class="special">)</span><span class="keyword">const</span><span class="special">{</span><span class="keyword">return</span> <span class="identifier">n</span><span class="special">;}</span> 160 161 <span class="keyword">int</span> <span class="identifier">n</span><span class="special">;</span> 162<span class="special">};</span> 163 164<span class="keyword">struct</span> <span class="identifier">concrete2</span> 165<span class="special">{</span> 166 <span class="identifier">concrete2</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">n</span><span class="special">):</span><span class="identifier">n</span><span class="special">{</span><span class="identifier">n</span><span class="special">}{}</span> 167 <span class="keyword">int</span> <span class="keyword">operator</span><span class="special">()(</span><span class="keyword">int</span> <span class="identifier">x</span><span class="special">)</span><span class="keyword">const</span><span class="special">{</span><span class="keyword">return</span> <span class="identifier">x</span><span class="special">*</span><span class="identifier">n</span><span class="special">;}</span> 168 169 <span class="keyword">int</span> <span class="identifier">unused</span><span class="special">,</span><span class="identifier">n</span><span class="special">;</span> 170<span class="special">};</span> 171 172<span class="keyword">struct</span> <span class="identifier">concrete3</span> 173<span class="special">{</span> 174 <span class="identifier">concrete3</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">n</span><span class="special">):</span><span class="identifier">n</span><span class="special">{</span><span class="identifier">n</span><span class="special">}{}</span> 175 <span class="keyword">int</span> <span class="keyword">operator</span><span class="special">()(</span><span class="keyword">int</span> <span class="identifier">x</span><span class="special">)</span><span class="keyword">const</span><span class="special">{</span><span class="keyword">return</span> <span class="identifier">x</span><span class="special">*</span><span class="identifier">x</span><span class="special">*</span><span class="identifier">n</span><span class="special">;}</span> 176 177 <span class="keyword">int</span> <span class="identifier">unused</span><span class="special">,</span><span class="identifier">n</span><span class="special">;</span> 178<span class="special">};</span> 179</pre> 180</div> 181<div class="section"> 182<div class="titlepage"><div><div><h4 class="title"> 183<a name="poly_collection.performance.container_definitions.boost_any_collection"></a><a class="link" href="performance.html#poly_collection.performance.container_definitions.boost_any_collection" title="boost::any_collection"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">any_collection</span></code></a> 184</h4></div></div></div> 185<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 186<li class="listitem"> 187 Baseline container: <code class="computeroutput"><span class="identifier">any_vector</span></code> 188 = <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">type_erasure</span><span class="special">::</span><span class="identifier">any</span><span class="special"><</span><span class="identifier">concept_</span><span class="special">>></span></code> 189 </li> 190<li class="listitem"> 191 Polymorphic collection: <code class="computeroutput"><span class="identifier">any_collection</span></code> 192 = <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">any_collection</span><span class="special"><</span><span class="identifier">concept_</span><span class="special">></span></code> 193 </li> 194<li class="listitem"> 195 Element types: <code class="computeroutput"><span class="identifier">T1</span></code> = 196 <code class="computeroutput"><span class="keyword">int</span></code>, <code class="computeroutput"><span class="identifier">T2</span></code> 197 = <code class="computeroutput"><span class="keyword">double</span></code>, <code class="computeroutput"><span class="identifier">T3</span></code> = <code class="computeroutput"><span class="keyword">char</span></code> 198 </li> 199</ul></div> 200<pre class="programlisting"><span class="keyword">using</span> <span class="identifier">concept_</span><span class="special">=</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span> 201 <span class="identifier">boost</span><span class="special">::</span><span class="identifier">type_erasure</span><span class="special">::</span><span class="identifier">copy_constructible</span><span class="special"><>,</span> 202 <span class="identifier">boost</span><span class="special">::</span><span class="identifier">type_erasure</span><span class="special">::</span><span class="identifier">relaxed</span><span class="special">,</span> 203 <span class="identifier">boost</span><span class="special">::</span><span class="identifier">type_erasure</span><span class="special">::</span><span class="identifier">typeid_</span><span class="special"><>,</span> 204 <span class="identifier">boost</span><span class="special">::</span><span class="identifier">type_erasure</span><span class="special">::</span><span class="identifier">incrementable</span><span class="special"><></span> 205<span class="special">>;</span> 206</pre> 207</div> 208</div> 209<div class="section"> 210<div class="titlepage"><div><div><h3 class="title"> 211<a name="poly_collection.performance.insertion_tests"></a><a class="link" href="performance.html#poly_collection.performance.insertion_tests" title="Insertion tests">Insertion 212 tests</a> 213</h3></div></div></div> 214<div class="toc"><dl class="toc"> 215<dt><span class="section"><a href="performance.html#poly_collection.performance.insertion_tests.results_for_boost_base_collectio">Results 216 for <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">base_collection</span></code></a></span></dt> 217<dt><span class="section"><a href="performance.html#poly_collection.performance.insertion_tests.results_for_boost_function_colle">Results 218 for <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">function_collection</span></code></a></span></dt> 219<dt><span class="section"><a href="performance.html#poly_collection.performance.insertion_tests.results_for_boost_any_collection">Results 220 for <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">any_collection</span></code></a></span></dt> 221</dl></div> 222<p> 223 Tests measure the time taken to insert <span class="emphasis"><em>n</em></span> elements (<span class="emphasis"><em>n</em></span> 224 between 10<sup>2</sup> and 10<sup>7</sup>) from a source of values with types following the cyclic 225 sequence 226 </p> 227<p> 228 <code class="computeroutput"><span class="identifier">T1</span></code> <code class="computeroutput"><span class="identifier">T1</span></code> 229 <code class="computeroutput"><span class="identifier">T2</span></code> <code class="computeroutput"><span class="identifier">T2</span></code> 230 <code class="computeroutput"><span class="identifier">T3</span></code> <code class="computeroutput"><span class="identifier">T1</span></code> 231 <code class="computeroutput"><span class="identifier">T1</span></code> <code class="computeroutput"><span class="identifier">T2</span></code> 232 <code class="computeroutput"><span class="identifier">T2</span></code> <code class="computeroutput"><span class="identifier">T3</span></code> 233 ··· 234 </p> 235<p> 236 No <code class="computeroutput"><span class="identifier">reserve</span></code> operation is done 237 before insertion. The figures show resulting times in nanoseconds/element. 238 The horizontal axis is logarithmic. 239 </p> 240<div class="section"> 241<div class="titlepage"><div><div><h4 class="title"> 242<a name="poly_collection.performance.insertion_tests.results_for_boost_base_collectio"></a><a class="link" href="performance.html#poly_collection.performance.insertion_tests.results_for_boost_base_collectio" title="Results for boost::base_collection">Results 243 for <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">base_collection</span></code></a> 244</h4></div></div></div> 245<div class="toc"><dl class="toc"> 246<dt><span class="section"><a href="performance.html#poly_collection.performance.insertion_tests.results_for_boost_base_collectio.environment">Visual 247 Studio 2015 x86</a></span></dt> 248<dt><span class="section"><a href="performance.html#poly_collection.performance.insertion_tests.results_for_boost_base_collectio.environment0">Visual 249 Studio 2015 x64</a></span></dt> 250<dt><span class="section"><a href="performance.html#poly_collection.performance.insertion_tests.results_for_boost_base_collectio.environment1">GCC 251 6.3 x64</a></span></dt> 252<dt><span class="section"><a href="performance.html#poly_collection.performance.insertion_tests.results_for_boost_base_collectio.environment2">Clang 253 4.0 x64</a></span></dt> 254</dl></div> 255<div class="section"> 256<div class="titlepage"><div><div><h5 class="title"> 257<a name="poly_collection.performance.insertion_tests.results_for_boost_base_collectio.environment"></a><a class="link" href="performance.html#poly_collection.performance.insertion_tests.results_for_boost_base_collectio.environment" title="Visual Studio 2015 x86">Visual 258 Studio 2015 x86</a> 259</h5></div></div></div> 260<p> 261 <span class="aligncenter"><span class="inlinemediaobject"><img src="img/insert_base_vs2015_x86.png"></span> 262</span> 263 <span class="aligncenter"><span class="bold"><strong>Insertion, Visual Studio 264 2015 x86</strong></span></span> 265 </p> 266</div> 267<div class="section"> 268<div class="titlepage"><div><div><h5 class="title"> 269<a name="poly_collection.performance.insertion_tests.results_for_boost_base_collectio.environment0"></a><a class="link" href="performance.html#poly_collection.performance.insertion_tests.results_for_boost_base_collectio.environment0" title="Visual Studio 2015 x64">Visual 270 Studio 2015 x64</a> 271</h5></div></div></div> 272<p> 273 <span class="aligncenter"><span class="inlinemediaobject"><img src="img/insert_base_vs2015_x64.png"></span> 274</span> 275 <span class="aligncenter"><span class="bold"><strong>Insertion, Visual Studio 276 2015 x64</strong></span></span> 277 </p> 278</div> 279<div class="section"> 280<div class="titlepage"><div><div><h5 class="title"> 281<a name="poly_collection.performance.insertion_tests.results_for_boost_base_collectio.environment1"></a><a class="link" href="performance.html#poly_collection.performance.insertion_tests.results_for_boost_base_collectio.environment1" title="GCC 6.3 x64">GCC 282 6.3 x64</a> 283</h5></div></div></div> 284<p> 285 <span class="aligncenter"><span class="inlinemediaobject"><img src="img/insert_base_gcc63_x64.png"></span> 286</span> 287 <span class="aligncenter"><span class="bold"><strong>Insertion, GCC 6.3 x64</strong></span></span> 288 </p> 289</div> 290<div class="section"> 291<div class="titlepage"><div><div><h5 class="title"> 292<a name="poly_collection.performance.insertion_tests.results_for_boost_base_collectio.environment2"></a><a class="link" href="performance.html#poly_collection.performance.insertion_tests.results_for_boost_base_collectio.environment2" title="Clang 4.0 x64">Clang 293 4.0 x64</a> 294</h5></div></div></div> 295<p> 296 <span class="aligncenter"><span class="inlinemediaobject"><img src="img/insert_base_clang40_x64.png"></span> 297</span> 298 <span class="aligncenter"><span class="bold"><strong>Insertion, Clang 4.0 299 x64</strong></span></span> 300 </p> 301</div> 302</div> 303<div class="section"> 304<div class="titlepage"><div><div><h4 class="title"> 305<a name="poly_collection.performance.insertion_tests.results_for_boost_function_colle"></a><a class="link" href="performance.html#poly_collection.performance.insertion_tests.results_for_boost_function_colle" title="Results for boost::function_collection">Results 306 for <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">function_collection</span></code></a> 307</h4></div></div></div> 308<div class="toc"><dl class="toc"> 309<dt><span class="section"><a href="performance.html#poly_collection.performance.insertion_tests.results_for_boost_function_colle.environment">Visual 310 Studio 2015 x86</a></span></dt> 311<dt><span class="section"><a href="performance.html#poly_collection.performance.insertion_tests.results_for_boost_function_colle.environment0">Visual 312 Studio 2015 x64</a></span></dt> 313<dt><span class="section"><a href="performance.html#poly_collection.performance.insertion_tests.results_for_boost_function_colle.environment1">GCC 314 6.3 x64</a></span></dt> 315<dt><span class="section"><a href="performance.html#poly_collection.performance.insertion_tests.results_for_boost_function_colle.environment2">Clang 316 4.0 x64</a></span></dt> 317</dl></div> 318<div class="section"> 319<div class="titlepage"><div><div><h5 class="title"> 320<a name="poly_collection.performance.insertion_tests.results_for_boost_function_colle.environment"></a><a class="link" href="performance.html#poly_collection.performance.insertion_tests.results_for_boost_function_colle.environment" title="Visual Studio 2015 x86">Visual 321 Studio 2015 x86</a> 322</h5></div></div></div> 323<p> 324 <span class="aligncenter"><span class="inlinemediaobject"><img src="img/insert_function_vs2015_x86.png"></span> 325</span> 326 <span class="aligncenter"><span class="bold"><strong>Insertion, Visual Studio 327 2015 x86</strong></span></span> 328 </p> 329</div> 330<div class="section"> 331<div class="titlepage"><div><div><h5 class="title"> 332<a name="poly_collection.performance.insertion_tests.results_for_boost_function_colle.environment0"></a><a class="link" href="performance.html#poly_collection.performance.insertion_tests.results_for_boost_function_colle.environment0" title="Visual Studio 2015 x64">Visual 333 Studio 2015 x64</a> 334</h5></div></div></div> 335<p> 336 <span class="aligncenter"><span class="inlinemediaobject"><img src="img/insert_function_vs2015_x64.png"></span> 337</span> 338 <span class="aligncenter"><span class="bold"><strong>Insertion, Visual Studio 339 2015 x64</strong></span></span> 340 </p> 341</div> 342<div class="section"> 343<div class="titlepage"><div><div><h5 class="title"> 344<a name="poly_collection.performance.insertion_tests.results_for_boost_function_colle.environment1"></a><a class="link" href="performance.html#poly_collection.performance.insertion_tests.results_for_boost_function_colle.environment1" title="GCC 6.3 x64">GCC 345 6.3 x64</a> 346</h5></div></div></div> 347<p> 348 <span class="aligncenter"><span class="inlinemediaobject"><img src="img/insert_function_gcc63_x64.png"></span> 349</span> 350 <span class="aligncenter"><span class="bold"><strong>Insertion, GCC 6.3 x64</strong></span></span> 351 </p> 352</div> 353<div class="section"> 354<div class="titlepage"><div><div><h5 class="title"> 355<a name="poly_collection.performance.insertion_tests.results_for_boost_function_colle.environment2"></a><a class="link" href="performance.html#poly_collection.performance.insertion_tests.results_for_boost_function_colle.environment2" title="Clang 4.0 x64">Clang 356 4.0 x64</a> 357</h5></div></div></div> 358<p> 359 <span class="aligncenter"><span class="inlinemediaobject"><img src="img/insert_function_clang40_x64.png"></span> 360</span> 361 <span class="aligncenter"><span class="bold"><strong>Insertion, Clang 4.0 362 x64</strong></span></span> 363 </p> 364</div> 365</div> 366<div class="section"> 367<div class="titlepage"><div><div><h4 class="title"> 368<a name="poly_collection.performance.insertion_tests.results_for_boost_any_collection"></a><a class="link" href="performance.html#poly_collection.performance.insertion_tests.results_for_boost_any_collection" title="Results for boost::any_collection">Results 369 for <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">any_collection</span></code></a> 370</h4></div></div></div> 371<div class="toc"><dl class="toc"> 372<dt><span class="section"><a href="performance.html#poly_collection.performance.insertion_tests.results_for_boost_any_collection.environment">Visual 373 Studio 2015 x86</a></span></dt> 374<dt><span class="section"><a href="performance.html#poly_collection.performance.insertion_tests.results_for_boost_any_collection.environment0">Visual 375 Studio 2015 x64</a></span></dt> 376<dt><span class="section"><a href="performance.html#poly_collection.performance.insertion_tests.results_for_boost_any_collection.environment1">GCC 377 6.3 x64</a></span></dt> 378<dt><span class="section"><a href="performance.html#poly_collection.performance.insertion_tests.results_for_boost_any_collection.environment2">Clang 379 4.0 x64</a></span></dt> 380</dl></div> 381<div class="section"> 382<div class="titlepage"><div><div><h5 class="title"> 383<a name="poly_collection.performance.insertion_tests.results_for_boost_any_collection.environment"></a><a class="link" href="performance.html#poly_collection.performance.insertion_tests.results_for_boost_any_collection.environment" title="Visual Studio 2015 x86">Visual 384 Studio 2015 x86</a> 385</h5></div></div></div> 386<p> 387 <span class="aligncenter"><span class="inlinemediaobject"><img src="img/insert_any_vs2015_x86.png"></span> 388</span> 389 <span class="aligncenter"><span class="bold"><strong>Insertion, Visual Studio 390 2015 x86</strong></span></span> 391 </p> 392</div> 393<div class="section"> 394<div class="titlepage"><div><div><h5 class="title"> 395<a name="poly_collection.performance.insertion_tests.results_for_boost_any_collection.environment0"></a><a class="link" href="performance.html#poly_collection.performance.insertion_tests.results_for_boost_any_collection.environment0" title="Visual Studio 2015 x64">Visual 396 Studio 2015 x64</a> 397</h5></div></div></div> 398<p> 399 <span class="aligncenter"><span class="inlinemediaobject"><img src="img/insert_any_vs2015_x64.png"></span> 400</span> 401 <span class="aligncenter"><span class="bold"><strong>Insertion, Visual Studio 402 2015 x64</strong></span></span> 403 </p> 404</div> 405<div class="section"> 406<div class="titlepage"><div><div><h5 class="title"> 407<a name="poly_collection.performance.insertion_tests.results_for_boost_any_collection.environment1"></a><a class="link" href="performance.html#poly_collection.performance.insertion_tests.results_for_boost_any_collection.environment1" title="GCC 6.3 x64">GCC 408 6.3 x64</a> 409</h5></div></div></div> 410<p> 411 <span class="aligncenter"><span class="inlinemediaobject"><img src="img/insert_any_gcc63_x64.png"></span> 412</span> 413 <span class="aligncenter"><span class="bold"><strong>Insertion, GCC 6.3 x64</strong></span></span> 414 </p> 415</div> 416<div class="section"> 417<div class="titlepage"><div><div><h5 class="title"> 418<a name="poly_collection.performance.insertion_tests.results_for_boost_any_collection.environment2"></a><a class="link" href="performance.html#poly_collection.performance.insertion_tests.results_for_boost_any_collection.environment2" title="Clang 4.0 x64">Clang 419 4.0 x64</a> 420</h5></div></div></div> 421<p> 422 <span class="aligncenter"><span class="inlinemediaobject"><img src="img/insert_any_clang40_x64.png"></span> 423</span> 424 <span class="aligncenter"><span class="bold"><strong>Insertion, Clang 4.0 425 x64</strong></span></span> 426 </p> 427</div> 428</div> 429</div> 430<div class="section"> 431<div class="titlepage"><div><div><h3 class="title"> 432<a name="poly_collection.performance.processing_tests"></a><a class="link" href="performance.html#poly_collection.performance.processing_tests" title="Processing tests">Processing 433 tests</a> 434</h3></div></div></div> 435<div class="toc"><dl class="toc"> 436<dt><span class="section"><a href="performance.html#poly_collection.performance.processing_tests.results_for_boost_base_collectio">Results 437 for <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">base_collection</span></code></a></span></dt> 438<dt><span class="section"><a href="performance.html#poly_collection.performance.processing_tests.results_for_boost_function_colle">Results 439 for <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">function_collection</span></code></a></span></dt> 440<dt><span class="section"><a href="performance.html#poly_collection.performance.processing_tests.results_for_boost_any_collection">Results 441 for <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">any_collection</span></code></a></span></dt> 442</dl></div> 443<p> 444 Tests measure the time taken to traverse a container of size <span class="emphasis"><em>n</em></span> 445 (<span class="emphasis"><em>n</em></span> between 10<sup>2</sup> and 10<sup>7</sup>) and execute an operation on each 446 of its elements. The operation for <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">base_collection</span></code> 447 and <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">function_collection</span></code> (and the associated 448 baseline containers) is defined as 449 </p> 450<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">for_each_callable</span> 451<span class="special">{</span> 452 <span class="identifier">for_each_callable</span><span class="special">():</span><span class="identifier">res</span><span class="special">{</span><span class="number">0</span><span class="special">}{}</span> 453 454 <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> 455 <span class="keyword">void</span> <span class="keyword">operator</span><span class="special">()(</span><span class="identifier">T</span><span class="special">&</span> <span class="identifier">x</span><span class="special">){</span> 456 <span class="identifier">res</span><span class="special">+=</span><span class="identifier">x</span><span class="special">(</span><span class="number">2</span><span class="special">);</span> 457 <span class="special">}</span> 458 459 <span class="keyword">int</span> <span class="identifier">res</span><span class="special">;</span> 460<span class="special">};</span> 461</pre> 462<p> 463 whereas for <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">any_collection</span></code> we use 464 </p> 465<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">for_each_incrementable</span> 466<span class="special">{</span> 467 <span class="identifier">for_each_incrementable</span><span class="special">():</span><span class="identifier">res</span><span class="special">{</span><span class="number">0</span><span class="special">}{}</span> 468 469 <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> 470 <span class="keyword">void</span> <span class="keyword">operator</span><span class="special">()(</span><span class="identifier">T</span><span class="special">&</span> <span class="identifier">x</span><span class="special">){</span> 471 <span class="special">++</span><span class="identifier">x</span><span class="special">;</span> 472 <span class="special">++</span><span class="identifier">res</span><span class="special">;</span> 473 <span class="special">}</span> 474 475 <span class="keyword">int</span> <span class="identifier">res</span><span class="special">;</span> 476<span class="special">};</span> 477</pre> 478<p> 479 The baseline container is tested with three different setups: 480 </p> 481<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 482<li class="listitem"> 483 Directly as initialized by the process described for the <a class="link" href="performance.html#poly_collection.performance.insertion_tests" title="Insertion tests">insertion 484 tests</a>. The sequence of types is complex enough that CPU's branch 485 prediction mechanisms are not able to fully anticipate it <a href="#ftn.poly_collection.performance.processing_tests.f0" class="footnote" name="poly_collection.performance.processing_tests.f0"><sup class="footnote">[21]</sup></a>. As elements are ordered according to their construction 486 time, certain degree of memory contiguity is expected. 487 </li> 488<li class="listitem"> 489 With an extra post-insertion stage by which elements are sorted according 490 to their <code class="computeroutput"><span class="keyword">typeid</span><span class="special">()</span></code>. 491 This increases branch prediction efficiency at the expense of having 492 worse cache friendliness. 493 </li> 494<li class="listitem"> 495 With an extra post-insertion stage that randomly shuffles all the elements 496 in the container. This is the worst possible scenario both in terms of 497 caching and branch prediction. 498 </li> 499</ul></div> 500<p> 501 As for the polymorphic collection, three variations are measured: 502 </p> 503<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 504<li class="listitem"> 505 With <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">for_each</span></code> (the same as the baseline 506 container). 507 </li> 508<li class="listitem"> 509 Using <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">poly_collection</span><span class="special">::</span><span class="identifier">for_each</span></code>. 510 </li> 511<li class="listitem"> 512 Using <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">poly_collection</span><span class="special">::</span><span class="identifier">for_each</span></code> with <a class="link" href="tutorial.html#poly_collection.tutorial.algorithms.type_restitution" title="Type restitution"><span class="emphasis"><em>type 513 restitution</em></span></a> of <code class="computeroutput"><span class="identifier">T1</span></code>, 514 <code class="computeroutput"><span class="identifier">T2</span></code> and <code class="computeroutput"><span class="identifier">T3</span></code>. 515 </li> 516</ul></div> 517<p> 518 The figures show resulting times in nanoseconds/element. The horizontal axis 519 is logarithmic. 520 </p> 521<div class="section"> 522<div class="titlepage"><div><div><h4 class="title"> 523<a name="poly_collection.performance.processing_tests.results_for_boost_base_collectio"></a><a class="link" href="performance.html#poly_collection.performance.processing_tests.results_for_boost_base_collectio" title="Results for boost::base_collection">Results 524 for <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">base_collection</span></code></a> 525</h4></div></div></div> 526<div class="toc"><dl class="toc"> 527<dt><span class="section"><a href="performance.html#poly_collection.performance.processing_tests.results_for_boost_base_collectio.environment">Visual 528 Studio 2015 x86</a></span></dt> 529<dt><span class="section"><a href="performance.html#poly_collection.performance.processing_tests.results_for_boost_base_collectio.environment0">Visual 530 Studio 2015 x64</a></span></dt> 531<dt><span class="section"><a href="performance.html#poly_collection.performance.processing_tests.results_for_boost_base_collectio.environment1">GCC 532 6.3 x64</a></span></dt> 533<dt><span class="section"><a href="performance.html#poly_collection.performance.processing_tests.results_for_boost_base_collectio.environment2">Clang 534 4.0 x64</a></span></dt> 535</dl></div> 536<div class="section"> 537<div class="titlepage"><div><div><h5 class="title"> 538<a name="poly_collection.performance.processing_tests.results_for_boost_base_collectio.environment"></a><a class="link" href="performance.html#poly_collection.performance.processing_tests.results_for_boost_base_collectio.environment" title="Visual Studio 2015 x86">Visual 539 Studio 2015 x86</a> 540</h5></div></div></div> 541<p> 542 <span class="aligncenter"><span class="inlinemediaobject"><img src="img/for_each_base_vs2015_x86.png"></span> 543</span> 544 <span class="aligncenter"><span class="bold"><strong>Processing, Visual Studio 545 2015 x86</strong></span></span> 546 </p> 547</div> 548<div class="section"> 549<div class="titlepage"><div><div><h5 class="title"> 550<a name="poly_collection.performance.processing_tests.results_for_boost_base_collectio.environment0"></a><a class="link" href="performance.html#poly_collection.performance.processing_tests.results_for_boost_base_collectio.environment0" title="Visual Studio 2015 x64">Visual 551 Studio 2015 x64</a> 552</h5></div></div></div> 553<p> 554 <span class="aligncenter"><span class="inlinemediaobject"><img src="img/for_each_base_vs2015_x64.png"></span> 555</span> 556 <span class="aligncenter"><span class="bold"><strong>Processing, Visual Studio 557 2015 x64</strong></span></span> 558 </p> 559</div> 560<div class="section"> 561<div class="titlepage"><div><div><h5 class="title"> 562<a name="poly_collection.performance.processing_tests.results_for_boost_base_collectio.environment1"></a><a class="link" href="performance.html#poly_collection.performance.processing_tests.results_for_boost_base_collectio.environment1" title="GCC 6.3 x64">GCC 563 6.3 x64</a> 564</h5></div></div></div> 565<p> 566 <span class="aligncenter"><span class="inlinemediaobject"><img src="img/for_each_base_gcc63_x64.png"></span> 567</span> 568 <span class="aligncenter"><span class="bold"><strong>Processing, GCC 6.3 569 x64</strong></span></span> 570 </p> 571</div> 572<div class="section"> 573<div class="titlepage"><div><div><h5 class="title"> 574<a name="poly_collection.performance.processing_tests.results_for_boost_base_collectio.environment2"></a><a class="link" href="performance.html#poly_collection.performance.processing_tests.results_for_boost_base_collectio.environment2" title="Clang 4.0 x64">Clang 575 4.0 x64</a> 576</h5></div></div></div> 577<p> 578 <span class="aligncenter"><span class="inlinemediaobject"><img src="img/for_each_base_clang40_x64.png"></span> 579</span> 580 <span class="aligncenter"><span class="bold"><strong>Processing, Clang 4.0 581 x64</strong></span></span> 582 </p> 583</div> 584</div> 585<div class="section"> 586<div class="titlepage"><div><div><h4 class="title"> 587<a name="poly_collection.performance.processing_tests.results_for_boost_function_colle"></a><a class="link" href="performance.html#poly_collection.performance.processing_tests.results_for_boost_function_colle" title="Results for boost::function_collection">Results 588 for <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">function_collection</span></code></a> 589</h4></div></div></div> 590<div class="toc"><dl class="toc"> 591<dt><span class="section"><a href="performance.html#poly_collection.performance.processing_tests.results_for_boost_function_colle.environment">Visual 592 Studio 2015 x86</a></span></dt> 593<dt><span class="section"><a href="performance.html#poly_collection.performance.processing_tests.results_for_boost_function_colle.environment0">Visual 594 Studio 2015 x64</a></span></dt> 595<dt><span class="section"><a href="performance.html#poly_collection.performance.processing_tests.results_for_boost_function_colle.environment1">GCC 596 6.3 x64</a></span></dt> 597<dt><span class="section"><a href="performance.html#poly_collection.performance.processing_tests.results_for_boost_function_colle.environment2">Clang 598 4.0 x64</a></span></dt> 599</dl></div> 600<div class="section"> 601<div class="titlepage"><div><div><h5 class="title"> 602<a name="poly_collection.performance.processing_tests.results_for_boost_function_colle.environment"></a><a class="link" href="performance.html#poly_collection.performance.processing_tests.results_for_boost_function_colle.environment" title="Visual Studio 2015 x86">Visual 603 Studio 2015 x86</a> 604</h5></div></div></div> 605<p> 606 <span class="aligncenter"><span class="inlinemediaobject"><img src="img/for_each_function_vs2015_x86.png"></span> 607</span> 608 <span class="aligncenter"><span class="bold"><strong>Processing, Visual Studio 609 2015 x86</strong></span></span> 610 </p> 611</div> 612<div class="section"> 613<div class="titlepage"><div><div><h5 class="title"> 614<a name="poly_collection.performance.processing_tests.results_for_boost_function_colle.environment0"></a><a class="link" href="performance.html#poly_collection.performance.processing_tests.results_for_boost_function_colle.environment0" title="Visual Studio 2015 x64">Visual 615 Studio 2015 x64</a> 616</h5></div></div></div> 617<p> 618 <span class="aligncenter"><span class="inlinemediaobject"><img src="img/for_each_function_vs2015_x64.png"></span> 619</span> 620 <span class="aligncenter"><span class="bold"><strong>Processing, Visual Studio 621 2015 x64</strong></span></span> 622 </p> 623</div> 624<div class="section"> 625<div class="titlepage"><div><div><h5 class="title"> 626<a name="poly_collection.performance.processing_tests.results_for_boost_function_colle.environment1"></a><a class="link" href="performance.html#poly_collection.performance.processing_tests.results_for_boost_function_colle.environment1" title="GCC 6.3 x64">GCC 627 6.3 x64</a> 628</h5></div></div></div> 629<p> 630 <span class="aligncenter"><span class="inlinemediaobject"><img src="img/for_each_function_gcc63_x64.png"></span> 631</span> 632 <span class="aligncenter"><span class="bold"><strong>Processing, GCC 6.3 633 x64</strong></span></span> 634 </p> 635</div> 636<div class="section"> 637<div class="titlepage"><div><div><h5 class="title"> 638<a name="poly_collection.performance.processing_tests.results_for_boost_function_colle.environment2"></a><a class="link" href="performance.html#poly_collection.performance.processing_tests.results_for_boost_function_colle.environment2" title="Clang 4.0 x64">Clang 639 4.0 x64</a> 640</h5></div></div></div> 641<p> 642 <span class="aligncenter"><span class="inlinemediaobject"><img src="img/for_each_function_clang40_x64.png"></span> 643</span> 644 <span class="aligncenter"><span class="bold"><strong>Processing, Clang 4.0 645 x64</strong></span></span> 646 </p> 647</div> 648</div> 649<div class="section"> 650<div class="titlepage"><div><div><h4 class="title"> 651<a name="poly_collection.performance.processing_tests.results_for_boost_any_collection"></a><a class="link" href="performance.html#poly_collection.performance.processing_tests.results_for_boost_any_collection" title="Results for boost::any_collection">Results 652 for <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">any_collection</span></code></a> 653</h4></div></div></div> 654<div class="toc"><dl class="toc"> 655<dt><span class="section"><a href="performance.html#poly_collection.performance.processing_tests.results_for_boost_any_collection.environment">Visual 656 Studio 2015 x86</a></span></dt> 657<dt><span class="section"><a href="performance.html#poly_collection.performance.processing_tests.results_for_boost_any_collection.environment0">Visual 658 Studio 2015 x64</a></span></dt> 659<dt><span class="section"><a href="performance.html#poly_collection.performance.processing_tests.results_for_boost_any_collection.environment1">GCC 660 6.3 x64</a></span></dt> 661<dt><span class="section"><a href="performance.html#poly_collection.performance.processing_tests.results_for_boost_any_collection.environment2">Clang 662 4.0 x64</a></span></dt> 663</dl></div> 664<div class="section"> 665<div class="titlepage"><div><div><h5 class="title"> 666<a name="poly_collection.performance.processing_tests.results_for_boost_any_collection.environment"></a><a class="link" href="performance.html#poly_collection.performance.processing_tests.results_for_boost_any_collection.environment" title="Visual Studio 2015 x86">Visual 667 Studio 2015 x86</a> 668</h5></div></div></div> 669<p> 670 <span class="aligncenter"><span class="inlinemediaobject"><img src="img/for_each_any_vs2015_x86.png"></span> 671</span> 672 <span class="aligncenter"><span class="bold"><strong>Processing, Visual Studio 673 2015 x86</strong></span></span> 674 </p> 675</div> 676<div class="section"> 677<div class="titlepage"><div><div><h5 class="title"> 678<a name="poly_collection.performance.processing_tests.results_for_boost_any_collection.environment0"></a><a class="link" href="performance.html#poly_collection.performance.processing_tests.results_for_boost_any_collection.environment0" title="Visual Studio 2015 x64">Visual 679 Studio 2015 x64</a> 680</h5></div></div></div> 681<p> 682 <span class="aligncenter"><span class="inlinemediaobject"><img src="img/for_each_any_vs2015_x64.png"></span> 683</span> 684 <span class="aligncenter"><span class="bold"><strong>Processing, Visual Studio 685 2015 x64</strong></span></span> 686 </p> 687</div> 688<div class="section"> 689<div class="titlepage"><div><div><h5 class="title"> 690<a name="poly_collection.performance.processing_tests.results_for_boost_any_collection.environment1"></a><a class="link" href="performance.html#poly_collection.performance.processing_tests.results_for_boost_any_collection.environment1" title="GCC 6.3 x64">GCC 691 6.3 x64</a> 692</h5></div></div></div> 693<p> 694 <span class="aligncenter"><span class="inlinemediaobject"><img src="img/for_each_any_gcc63_x64.png"></span> 695</span> 696 <span class="aligncenter"><span class="bold"><strong>Processing, GCC 6.3 697 x64</strong></span></span> 698 </p> 699</div> 700<div class="section"> 701<div class="titlepage"><div><div><h5 class="title"> 702<a name="poly_collection.performance.processing_tests.results_for_boost_any_collection.environment2"></a><a class="link" href="performance.html#poly_collection.performance.processing_tests.results_for_boost_any_collection.environment2" title="Clang 4.0 x64">Clang 703 4.0 x64</a> 704</h5></div></div></div> 705<p> 706 <span class="aligncenter"><span class="inlinemediaobject"><img src="img/for_each_any_clang40_x64.png"></span> 707</span> 708 <span class="aligncenter"><span class="bold"><strong>Processing, Clang 4.0 709 x64</strong></span></span> 710 </p> 711</div> 712</div> 713</div> 714<div class="footnotes"> 715<br><hr style="width:100; text-align:left;margin-left: 0"> 716<div id="ftn.poly_collection.performance.processing_tests.f0" class="footnote"><p><a href="#poly_collection.performance.processing_tests.f0" class="para"><sup class="para">[21] </sup></a> 717 This has been verified empirically: simpler cycles did indeed yield 718 better execution times. 719 </p></div> 720</div> 721</div> 722<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 723<td align="left"></td> 724<td align="right"><div class="copyright-footer">Copyright © 2016-2020 Joaquín M López Muñoz<p> 725 Distributed under the Boost Software License, Version 1.0. (See accompanying 726 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>) 727 </p> 728</div></td> 729</tr></table> 730<hr> 731<div class="spirit-nav"> 732<a accesskey="p" href="tutorial.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../poly_collection.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="reference.html"><img src="../../../doc/src/images/next.png" alt="Next"></a> 733</div> 734</body> 735</html> 736