    <rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:content="http://purl.org/rss/1.0/modules/content/">
     <channel>
        <title>ACCU  :: DynamicAny (Part 2)</title>
        <link>https://members.accu.org/index.php/articles/1511</link>
        <description>Professionalism in Programming</description>
        <dc:language>en-us</dc:language> 
        <dc:creator>Administrator</dc:creator> 
        <admin:generatorAgent rdf:resource="http://www.xaraya.org" /> 
        <admin:errorReportsTo rdf:resource="mailto:webeditor@accu.org" />
       <sy:updatePeriod>hourly</sy:updatePeriod>
       <sy:updateFrequency>1</sy:updateFrequency>
       <docs>http://backend.userland.com/rss</docs>




<div class="xar-mod-head"><span class="xar-mod-title">Programming Topics + Design of applications and programs + Overload Journal #87 - October 2008</span></div>

<table border="0" cellpadding="1" cellspacing="0">
    <tbody>
    <tr>
        <td valign="top">
            Browse in :
       </td>
       <td valign="top">

                                            <a href="https://members.accu.org/index.php/articles/">All</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c13/">Topics</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c65/">Programming</a>
<br />

                                            <a href="https://members.accu.org/index.php/articles/">All</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c13/">Topics</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c67/">Design</a>
<br />

                                            <a href="https://members.accu.org/index.php/articles/">All</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c76/">Journals</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c78/">Overload</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c245/">87</a>
<br />

                                            <a href="https://members.accu.org/index.php/articles/c65-67-245/">Any of these categories</a>

                    -                        <a href="https://members.accu.org/index.php/articles/c65+67+245/">All of these categories</a>
<br />
</td>
   </tr>
   </tbody>
</table>




<div class="xar-error">
   <p>
 <strong>Note:</strong> when you create a new publication type,
the articles module will automatically use the templates
<em>user-display-[publicationtype].xt</em>
and <em>user-summary-[publicationtype].xt</em>.
If those templates do not exist when you try to preview or display a new article,
you'll get this warning :-)  Please place your own templates in themes/<em>yourtheme</em>/modules/articles . The templates will get the extension .xt there. </p>
</div>
<div class="xar-norm xar-standard-box-padding">
   <h1><strong>Title:</strong>&nbsp;DynamicAny (Part 2)</h1>
<p><strong>Author:</strong>&nbsp;</p>
<p>
<strong>Date:</strong> 26 October 2008 08:58:00 +00:00 or Sun, 26 October 2008 08:58:00 +00:00</p>
<p><strong>Summary:</strong>&nbsp;Alex Fabijanic uncovers the internals of DynamicAny with some performance and size tests.</p>
<p><strong>Body:</strong>&nbsp;<p>In the first installment of this article, <tt class="code">Poco::DynamicAny</tt> class was presented, along with rationale for it as well as practical usage examples. The convenient advantages, such as direct dynamically typed mapping from an external data source to the program storage were described. Like <tt class="code">boost::any</tt>, <tt class="code">DynamicAny</tt> readily provides storage and value extraction of an arbitrary user defined data type. The most common data types conversions are supported out-of-the-box through specializations provided by POCO framework, while the ones for user defined types can be added through value holder template specialization. In this installment, we delve into the internals of the class and run some tests to compare <tt class="code">DynamicAny</tt> to similar C++ data type conversion facilities.
  </p><h2>
    Performance
  </h2><p>
    It is well known that there is no such thing as a free lunch. <tt class="code">DynamicAny</tt> shall clearly pay a hefty price in CPU cycle currency for its flexibility and safety. But how well does <tt class="code">DynamicAny</tt> perform compared to bare-bone static C++ casts and other dynamic typing solutions?
  </p><p>
    Two types of tests were performed:
  </p>
		<ul><li>
    conversion (<tt class="code">Int32</tt> in, <tt class="code">double</tt> out; <tt class="code">Int32</tt> in, <tt class="code">Uint16</tt> out; <tt class="code">std::string</tt> in, <tt class="code">double</tt> out)
  </li><li>
    extraction (<tt class="code">double</tt> in, <tt class="code">double</tt> out; <tt class="code">std::string</tt> in, <tt class="code">std::string</tt> out)
  </li></ul><p>
    Various <tt class="code">Any</tt> extractions are compared with the <tt class="code">DynamicAny</tt> extraction. As described in the first part of the article, <tt class="code">Any</tt> is not capable of doing conversions. For conversions, we are comparing <tt class="code">DynamicAny</tt> with <tt class="code">boost::lexical_cast</tt>. The test code is shown in Listing 1.
  </p>
  <p>
  <table class="sidebartable"><tr><td><pre class="programlisting">
    // Static cast Int32 to double
    Int32 i = 0;
    double d;
    Stopwatch sw; sw.start();
    do { staticCastInt32ToDouble(d, i); }
    while (++i &lt; count); sw.stop();
    print(&quot;static_cast&lt;double&gt;(Int32)&quot;, sw.elapsed());

    Any a = 1.0; i = 0; sw.start();
    do { unsafeAnyCastAnyToDouble(d, a); }
    while (++i &lt; count); sw.stop();
    print(&quot;UnsafeAnyCast&lt;double&gt;(Int32)&quot;, sw.elapsed());

    // Conversion Int32 to double
    i = 0; sw.start();
    do { lexicalCastInt32ToDouble(d, i); }
    while (++i &lt; count); sw.stop();
    print(&quot;boost::lexical_cast&lt;double&gt;(Int32)&quot;, sw.elapsed());

    DynamicAny da = 1;
    i = 0; sw.restart();
    do { convertInt32ToDouble(d, da); }
    while (++i &lt; count); sw.stop();
    print(&quot;DynamicAny&lt;Int32&gt;::convert&lt;double&gt;()&quot;, sw.elapsed());
    i = 0; sw.restart();
    do { assignInt32ToDouble(d, da); }
    while (++i &lt; count); sw.stop();
    print(&quot;operator=(double, DynamicAny&lt;Int32&gt;)&quot;, sw.elapsed());

    // Conversion signed Int32 to UInt16
    // ...

    // Conversion string to double
    // ...

    // Extraction double
    a = 1.0; i = 0; sw.restart();
    do { anyCastRefDouble(d, a); }
    while (++i &lt; count); sw.stop();

    i = 0; sw.restart();
    do { anyCastPtrDouble(d, a); }
    while (++i &lt; count); sw.stop();

    da = 1.0; i = 0; sw.restart();
    do { extractDouble(d, da); }
    while (++i &lt; count); sw.stop();

    // Extraction string
    //
    void staticCastInt32ToDouble(double&amp; d, int i)
    { d = static_cast&lt;double&gt;(i); }

    void unsafeAnyCastAnyToDouble(double&amp; d, Any&amp; a)
    { d = *UnsafeAnyCast&lt;double&gt;(&amp;a); }

    void lexicalCastInt32ToDouble(double&amp; d, int i)
    { d = boost::lexical_cast&lt;double&gt;(i); }

    void convertInt32ToDouble(double&amp; d,
       DynamicAny&amp; da)
    { d = da.convert&lt;double&gt;(); }

    void assignInt32ToDouble(double&amp; d,
       DynamicAny&amp; da)
    { d = da; }

    void lexicalCastInt32toUInt16(UInt16&amp; us,
       Int32 j)
    { us = boost::lexical_cast&lt;UInt16&gt;(j); }

    void convertInt32toUInt16(UInt16&amp; us,
       DynamicAny&amp; da)
    { us = da.convert&lt;UInt16&gt;(); }

    void assignInt32toUInt16(UInt16&amp; us,
       DynamicAny&amp; da)
    { us = da; }

    void lexicalCastStringToDouble(double&amp; d,
       std::string&amp; s)
    { d = boost::lexical_cast&lt;double&gt;(s); }

    void convertStringToDouble(double&amp; d,
       DynamicAny&amp; ds)
    { d = ds.convert&lt;double&gt;(); }

    void assignStringToDouble(double&amp; d,
       DynamicAny&amp; ds)
    { d = ds; }

    void anyCastRefDouble(double&amp; d, Any&amp; a)
    { d = RefAnyCast&lt;double&gt;(a); }

    void anyCastPtrDouble(double&amp; d, Any&amp; a)
    { d = *AnyCast&lt;double&gt;(&amp;a); }

    void extractDouble(double&amp; d, DynamicAny&amp; da)
    { d = da.extract&lt;double&gt;(); }
  </pre></td></tr><tr><td class="title">Listing 1</td></tr></table>
  </p>
  <p>
    Tests have been executed on different platforms, with results shown in Table 1 as well as Figure 1a and 1b (Windows) and 2a and 2b (Linux)<sup><a href="#footnote1">1</a></sup>. It is worth mentioning that the relative performance comparison between different implementations of comparable functionalities is what we were after here, not the absolute values comparison between the two sets of test results (i.e. the two platforms). To get measurable results, the tested code must be called multiple times. Since compiler optimizations undoubtedly count in the real world, it was desirable to obtain the results reflecting the optimization benefits. At the same time, loop optimization could cause results to be misleading. In order to reconcile the opposing forces, executables were compiled at a reasonable level of optimization<sup><a href="#footnote2">2</a></sup>, with actual conversion code placed in functions (see Listing 2.) located in a separate compilation unit. This arrangement ensured that all tests incur the same function call penalty, thus preserving the performance ratios, while benefiting from the tested functionality optimization improvements. As the test results demonstrate, <tt class="code">DynamicAny</tt> performs significantly better than competition in conversion and approximately the same in extraction scenarios. Tests have additionally been compiled and executed on Solaris with Sun CC compiler yielding similar results. For conciseness purposes, those results are not included here but can be obtained from [<a href="#DynamicAny">DynamicAny</a>].
  </p>
<p>
<table class="sidebartable"><tr><td><pre class="programlisting">
    void anyCastPtrString(std::string&amp; s, Any&amp; as)
    { s = *AnyCast&lt;std::string&gt;(&amp;as); }

    void extractString(std::string&amp; s,
       DynamicAny&amp; ds)
    { s = ds.extract&lt;std::string&gt;(); }
</pre></td></tr><tr><td class="title">Listing 2</td></tr></table>
</p>
<p>
  <table class="sidebartable"><tr><td>
		<table class="results">
			<tr>
				<th>Operation</th>
				<th>Windows</th>
				<th>Linux</th>
			</tr>
			<tr>
				<td colspan="3"><p><b> Static cast Int32 =&gt; double</b></p>
				</td>
			</tr>
			<tr>
				<td><p>  static_cast&lt;double&gt;(Int32) </p>
				</td>
				<td><p>  31.25 </p>
				</td>
				<td><p>  29.11 </p>
				</td>
			</tr>
			<tr>
				<td><p>  UnsafeAnyCast&lt;double&gt;(Int32) </p>
				</td>
				<td><p>  78.13 </p>
				</td>
				<td><p>  60.10 </p>
				</td>
			</tr>
			<tr>
				<td colspan="3"><p><b> Conversion Int32 =&gt; double</b></p>
				</td>
			</tr>
			<tr>
				<td><p>  boost::lexical_cast&lt;double&gt;(Int32) </p>
				</td>
				<td><p>  41187.50 </p>
				</td>
				<td><p>  14469.90 </p>
				</td>
			</tr>
			<tr>
				<td><p>  DynamicAny&lt;Int32&gt;::convert&lt;double&gt;() </p>
				</td>
				<td><p>  78.13 </p>
				</td>
				<td><p>  76.85 </p>
				</td>
			</tr>
			<tr>
				<td><p>  operator=(double, DynamicAny&lt;Int32&gt;) </p>
				</td>
				<td><p>  78.13 </p>
				</td>
				<td><p>  76.79 </p>
				</td>
			</tr>
			<tr>
				<td colspan="3"><p><b> Conversion Int32 =&gt; unsigned short</b></p>
				</td>
			</tr>
			<tr>
				<td><p>  boost::lexical_cast&lt;UInt16&gt;(Int32) </p>
				</td>
				<td><p>  33546.90 </p>
				</td>
				<td><p>  8631.60 </p>
				</td>
			</tr>
			<tr>
				<td><p>  DynamicAny&lt;Int32&gt;::convert&lt;UInt16&gt;() </p>
				</td>
				<td><p>  218.75 </p>
				</td>
				<td><p>  84.85 </p>
				</td>
			</tr>
			<tr>
				<td><p>  operator=(UInt16, DynamicAny&lt;Int32&gt;) </p>
				</td>
				<td><p>  218.75 </p>
				</td>
				<td><p>  84.85 </p>
				</td>
			</tr>
			<tr>
				<td colspan="3"><p><b> Conversion std::string =&gt; double</b></p>
				</td>
			</tr>
			<tr>
				<td><p>  boost::lexical_cast&lt;double&gt;(string) </p>
				</td>
				<td><p>  37312.50 </p>
				</td>
				<td><p>  13999.70 </p>
				</td>
			</tr>
			<tr>
				<td><p>  DynamicAny&lt;string&gt;::convert&lt;double&gt;() </p>
				</td>
				<td><p>  6046.88 </p>
				</td>
				<td><p>  3858.34 </p>
				</td>
			</tr>
			<tr>
				<td><p>  operator=(double, DynamicAny&lt;string&gt;) </p>
				</td>
				<td><p>  6031.25 </p>
				</td>
				<td><p>  3858.89 </p>
				</td>
			</tr>
			<tr>
				<td colspan="3"><p><b> Extraction double</b></p>
				</td>
			</tr>
			<tr>
				<td><p>  RefAnyCast&lt;double&gt;(Any&amp;) </p>
				</td>
				<td><p>  171.88 </p>
				</td>
				<td><p>  131.26 </p>
				</td>
			</tr>
			<tr>
				<td><p>  AnyCast&lt;double&gt;(Any*) </p>
				</td>
				<td><p>  140.63 </p>
				</td>
				<td><p>  102.21 </p>
				</td>
			</tr>
			<tr>
				<td><p>  DynamicAny::extract&lt;double&gt;() </p>
				</td>
				<td><p>  171.83 </p>
				</td>
				<td><p>  98.71 </p>
				</td>
			</tr>
			<tr>
				<td colspan="3"><p><b> Extraction string</b></p>
				</td>
			</tr>
			<tr>
				<td><p>  RefAnyCast&lt;string&gt;(Any&amp;) </p>
				</td>
				<td><p>  890.63 </p>
				</td>
				<td><p>  189.33 </p>
				</td>
			</tr>
			<tr>
				<td><p>  AnyCast&lt;string&gt;(Any*) </p>
				</td>
				<td><p>  906.25 </p>
				</td>
				<td><p>  160.26 </p>
				</td>
			</tr>
			<tr>
				<td><p>  DynamicAny::extract&lt;string&gt;() </p>
				</td>
				<td><p>  906.25 </p>
				</td>
				<td><p>  152.99 </p>
				</td>
			</tr>
			<tr>
				<td colspan="3"><p>  Loop count: 5,000,000 </p>
				</td>
			</tr>
			<tr>
				<td colspan="3"><p>  Results in milliseconds </p>
				</td>
			</tr>
		</table>
  </td></tr><tr><td class="title">Table 1</td></tr></table>
  </p>
  <p>
<table class="sidebartable"><tr><td>
<img src="/content/images/journals/ol87/Fabijanic/WindowsConvertFig1a.png"/>
<img src="/content/images/journals/ol87/Fabijanic/WindowsConvertFig1b.png"/>
</td></tr><tr><td class="title">Figure 1</td></tr></table>
</p>
<p>
<table class="sidebartable"><tr><td>
<img src="/content/images/journals/ol87/Fabijanic/LinuxConvertFig2a.png"/>
<img src="/content/images/journals/ol87/Fabijanic/LinuxConvertFig2b.png"/>
</td></tr><tr><td class="title">Figure 2</td></tr></table>
</p>
<p>
    It is important to mention that the performance results were obtained using the most recent development snapshot from the POCO source code repository [<a href="#POCO">POCO</a>]. The <tt class="code">DynamicAny::extract&lt;&gt;()</tt> code used for performance testing purposes performs approximately two times faster than the code from the last release (1.3.2)<sup><a href="#footnote3">3</a></sup>. The improvement was achieved by substituting the <tt class="code">dynamic_cast</tt> with <tt class="code">typeid()</tt> check in conjunction with <tt class="code">static_cast</tt>. Additionally, the performance of <tt class="code">AnyCast&lt;&gt;()</tt> and <tt class="code">RefAnyCast&lt;&gt;()</tt> has been improved in the development code base through inlining.
  </p><p>
    Dynamic typing in C++ is a niche functionality with limited application domain and certainly not aimed for use in code on the high-end of the performance requirements spectrum. Nevertheless, we felt that performance is a relevant concern for <tt class="code">DynamicAny</tt>. Given the database querying scenario mentioned in the first installment of the article, it is easy to envision circumstances where code performs acceptably with small data sets but performance significantly deteriorates as data sets grow. As demonstrated in performance tests, in such circumstances milliseconds rapidly accumulate into seconds or even minutes. The attention given to performance definitely yields a nice return on investment in such scenarios and provides a wider scale range available for comfortable type-agnostic coding.
  </p><h2>
    Size
  </h2><p>
    So far, it all went nice and well for <tt class="code">DynamicAny</tt>. It provides more features than <tt class="code">boost::any</tt> with no performance penalty for the overlapping ones. The conversions are significantly faster than <tt class="code">boost::lexical_cast</tt>. However, when it comes to software, size definitely matters and the moment of truth is inevitably coming. What exactly is the memory overhead of this luxury and how much memory does this class hierarchy consume? Holding only a pointer, the size of <tt class="code">DynamicAny</tt> on a 32-bit architecture is exactly the same as the size of <tt class="code">boost::any</tt> (or <tt class="code">integer</tt>, for that matter) - four bytes. Where <tt class="code">DynamicAny</tt> pays its price is the code size. There is a significant amount of code doing the heavy lifting behind the scenes and it clearly shows in the size. See Listing 3a for size test source code, Listing 3b for binary sizes and Listing 3c for source code line counts. The results were obtained by compiling non-debug, statically-linked code and running SLOCCount tool [<a href="#Wheeler">Wheeler</a>] on relevant source code files.
  </p>
<p>
<table class="sidebartable"><tr><td><pre class="programlisting">
    // AnySize.cpp
    static Poco::Any a = 1;
    static int ai = *Poco::AnyCast&lt;int&gt;(&amp;a);

    // DynamicAnySizeExtract.cpp
    static Poco::DynamicAny da = 1;
    int dai = da.extract&lt;int&gt;();

    // DynamicAnySizeConvert.cpp
    static Poco::DynamicAny dac = 1;
    static std::string das = dac;

    // lexical_cast_size.cpp
    static int lci = 1;
    static std::string lcis = boost::lexical_cast&lt;std::string&gt;(lci);
</pre></td></tr><tr><td class="title">Listing 3a</td></tr></table>
</p>
<p>
<table class="sidebartable"><tr><td><pre class="programlisting">
    Binary sizes:

    Linux
    -----
     5160 AnySize.o
    23668 DynamicAnySizeExtract.o

    25152 DynamicAnySizeConvert.o
     9600 lexical_cast_size.o

    Windows
    -------
     26,924 AnySize.obj
     96,028 DynamicAnySizeExtract.obj

    103,943 DynamicAnySizeConvert.obj
     84,217 lexical_cast_size.obj
</pre></td></tr><tr><td class="title">Listing 3b</td></tr></table>
</p>
<p>
<table class="sidebartable"><tr><td><pre class="programlisting">
    Lines of code:

    Any            145
    DynamicAny*  3,588
    lexical_cast   971
</pre></td></tr><tr><td class="title">Listing 3c</td></tr></table>
</p>
<h2>
    Implementation internals
  </h2><p>
    Based on the information provided in the first installment and the tests results, <tt class="code">DynamicAny</tt> clearly champions convenience and performance in an optimal way. How was this winning combination achieved? Let's peek into <tt class="code">DynamicAny</tt>'s internal implementation. At the heart of <tt class="code">DynamicAny</tt> is the value holder class with virtual conversion function for each supported type. Conversions between numeric types are performed by implementation specializations in following manner:
  </p>
		<ul><li>
    implicitly between 'sibling' types for widening conversions
  </li><li>
    through <tt class="code">static_cast</tt> for narrowing and signedness conversions (after series of thorough signedness and numeric limits checks)
  </li></ul><p>
    Conversions between numeric and string values are performed by means of <tt class="code">Poco::NumberFormatter</tt> and <tt class="code">Poco::NumberParser</tt> classes. These classes perform the conversion by means of the <tt class="code">sprintf()</tt> and <tt class="code">sscanf()</tt> standard C library functions. The pair of otherwise much dreaded functions is used in a controlled and safe way with target buffers properly sized, so the security problems usually associated with those functions are not a concern [<a href="#Seacord06">Seacord06</a>]. The performance benefits are obvious from the comparison of the test results with <tt class="code">boost::lexical_cast</tt> equivalent functionality.
  </p><p>
    A portion of conversion code for signed 16-bit integer specialization is shown in Listing 4.
  </p>
<table class="sidebartable"><tr><td><pre class="programlisting">
    template &lt;&gt;
    class DynamicAnyHolderImpl&lt;Int16&gt;: public DynamicAnyHolder
    {
    public:

    // ...

      // implicit widening conversion
      void convert(Int32&amp; val) const {
        val = _val;
      }

      // safe narrowing conversion
      void convert(Int8&amp; val) const {
        convertToSmaller(_val, val);
      }

      // safe signed/unsigned conversion
      void convert(UInt64&amp; val) const {
        convertSignedToUnsigned(_val, val);
      }

      // static_cast based conversion
      void convert(float&amp; val) const {
        val = static_cast&lt;float&gt;(_val);
      }

      // conversion to std::string
      void convert(std::string&amp; val) const {
        val = NumberFormatter::format(_val);
      }
    // ...
    };
</pre></td></tr><tr><td class="title">Listing 4</td></tr></table>
  <h2>
    Conclusion
  </h2><p>
    During the development of POCO Data library, we wanted to provide a convenient <tt class="code">RecordSet</tt> class capable of internally storing results and providing values without having programmer worrying about the exact data types returned and the column order thereof. The objectives were to achieve optimal dynamic coding convenience within limits of standard C++ while retaining as much efficiency as possible for a dynamic typing scenario. Additionally, conversion safety and data loss prevention were addressed as well. Through <tt class="code">DynamicAny</tt> class hierarchy we were able to achieve the objectives. Of course, this work was possible thanks to a solid foundation being laid down by our predecessors. DynamicAny is built on <tt class="code">boost::any</tt> foundation as well as crucially important C++ features such as C language compatibility, operator overloading and free-standing functions as interface extensions.
  </p><p>
    Readers curious about implementation and usage details are invited to download POCO from the links supplied at the end of this article. POCO is distributed under Boost license. The community features weblog, forum, mailing list and a friendly attitude toward newcomers. General interest inquiries, bug reports, patches, feature requests as well as code contributions are encouraged and very much appreciated.</p><h2>
    Acknowledgements
  </h2><p>
    Kevlin Henney is the originator of the idea and author of <tt class="code">boost::any</tt> class. Kevlin has provided valuable comments on the article.
  </p><p>
    Peter Schojer has ported <tt class="code">boost::any</tt> to POCO, implemented major portions of <tt class="code">DynamicAny</tt> and provided valuable comments on the article.
  </p><p>
    G&uuml;nter Obiltschnig has written majority of the POCO framework. G&uuml;nter has provided valuable comments on the article as well as advice for test code.
  </p><p>
    Laszlo Keresztfalvi has provided valuable development and testing feedback, sample usage code as well as valuable comments on the article.
  </p><h2>
    References
  </h2><p class="bibliomixed">
    [<a name="DynamicAny"></a>DynamicAny] Article code and test results archive - <a href="http://appinf.us/poco/download/DynamicAny/DynamicAnyArticle.zip">http://appinf.us/poco/download/DynamicAny/DynamicAnyArticle.zip</a>
  </p><p class="bibliomixed">
    [<a name="POCO"></a>POCO]  C++ Portable Components development repository - <a href="http://poco.svn.sourceforge.net/viewvc/poco/">http://poco.svn.sourceforge.net/viewvc/poco/</a>
  </p><p class="bibliomixed">
    [<a name="Seacord"></a>Seacord]  Robert C. Seacord. <i>Secure Coding in C and C++</i>, Addison-Wesley, 2006
  </p><p class="bibliomixed">
    [<a name="Wheeler"></a>Wheeler] David A. Wheeler. 'SLOCCount' - <a href="http://www.dwheeler.com/sloccount/">http://www.dwheeler.com/sloccount/</a>
  </p><h2>
    Further reading
  </h2><p class="bibliomixed">
    Bjarne Stroustrup. <i>The C++ Programming Language</i>, Addison-Wesley, 1997
  </p><p class="bibliomixed">
    Herb Sutter. 'Modern C++ Libraries', <i>Proceedings, SD West 2007</i></p><p class="bibliomixed">
    Kevlin Henney. 'Valued Conversions', <i>C++ Report</i>, July-August 2000
  </p><p class="bibliomixed">
    Boost libraries - <a href="http://www.boost.org">http://www.boost.org</a>
  </p><p class="bibliomixed">
    C++ Portable Components - <a href="http://poco.sourceforge.net">http://poco.sourceforge.net</a>
  </p><p class="bibliomixed">
    Article code repository - <a href="http://poco.svn.sourceforge.net/viewvc/poco/poco/articles/DynamicAny/">http://poco.svn.sourceforge.net/viewvc/poco/poco/articles/DynamicAny/</a>
  </p>
<p class="footnotes">
    <a name="footnote1"></a>1&nbsp;&nbsp;&nbsp;Black bars represent DynamicAny, grey bars represent <tt class="code">Any</tt>/<tt class="code">lexical_cast</tt> results; shorter bar means better performance.<br/>
    <a name="footnote2"></a>2&nbsp;&nbsp;&nbsp;/02 for MSVC++, -02 for G++<br/>
    <a name="footnote3"></a>3&nbsp;&nbsp;&nbsp;Release information accurate at the time of writing the article.<br/>
  </p>
</p>
<p><strong>Notes:</strong>&nbsp;</p>
<p><em>More fields may be available via dynamicdata ..</em></p>
</div>
</channel>
</rss>
