<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: S-expressions and variant</title>
	<atom:link href="http://boost-spirit.com/home/2010/03/11/s-expressions-and-variants/feed/" rel="self" type="application/rss+xml" />
	<link>http://boost-spirit.com/home/2010/03/11/s-expressions-and-variants/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=s-expressions-and-variants</link>
	<description>Home of The Boost.Spirit Library</description>
	<lastBuildDate>Fri, 06 Apr 2012 07:20:56 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Joel de Guzman</title>
		<link>http://boost-spirit.com/home/2010/03/11/s-expressions-and-variants/comment-page-1/#comment-47102</link>
		<dc:creator>Joel de Guzman</dc:creator>
		<pubDate>Tue, 28 Feb 2012 00:32:22 +0000</pubDate>
		<guid isPermaLink="false">http://boost-spirit.com/home/?p=1039#comment-47102</guid>
		<description>That is the common perception alright, but i&#039;m not so sure about that for this case. memset has to deal with off sizes. Anyway, if I really wanted blazing speed, I&#039;d unroll the loop (since the size is static anyway), but that is not the main intent.</description>
		<content:encoded><![CDATA[<p>That is the common perception alright, but i&#8217;m not so sure about that for this case. memset has to deal with off sizes. Anyway, if I really wanted blazing speed, I&#8217;d unroll the loop (since the size is static anyway), but that is not the main intent.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthias vallentin</title>
		<link>http://boost-spirit.com/home/2010/03/11/s-expressions-and-variants/comment-page-1/#comment-47101</link>
		<dc:creator>Matthias vallentin</dc:creator>
		<pubDate>Tue, 28 Feb 2012 00:25:23 +0000</pubDate>
		<guid isPermaLink="false">http://boost-spirit.com/home/?p=1039#comment-47101</guid>
		<description>Thanks, I understand (1) and now (2a). For (2b), why didn&#039;t you use &lt;code&gt;memset&lt;/code&gt;? My understanding is that is the most efficient way to initialize memory with a constant value.</description>
		<content:encoded><![CDATA[<p>Thanks, I understand (1) and now (2a). For (2b), why didn&#8217;t you use <code>memset</code>? My understanding is that is the most efficient way to initialize memory with a constant value.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joel de Guzman</title>
		<link>http://boost-spirit.com/home/2010/03/11/s-expressions-and-variants/comment-page-1/#comment-47100</link>
		<dc:creator>Joel de Guzman</dc:creator>
		<pubDate>Mon, 27 Feb 2012 23:45:59 +0000</pubDate>
		<guid isPermaLink="false">http://boost-spirit.com/home/?p=1039#comment-47100</guid>
		<description>Mathias, its purpose is to make sure that 1) we initialize the string to zero 2) that we have a size that&#039;s divisible by sizeof(long). The latter has the advantage of a) optimizing the buffer usage since machine architectures tend to align the structs/unions anyway, and b) having to zero the string in size/sizeof(long) operations instead of size operations.</description>
		<content:encoded><![CDATA[<p>Mathias, its purpose is to make sure that 1) we initialize the string to zero 2) that we have a size that&#8217;s divisible by sizeof(long). The latter has the advantage of a) optimizing the buffer usage since machine architectures tend to align the structs/unions anyway, and b) having to zero the string in size/sizeof(long) operations instead of size operations.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthias vallentin</title>
		<link>http://boost-spirit.com/home/2010/03/11/s-expressions-and-variants/comment-page-1/#comment-47091</link>
		<dc:creator>Matthias vallentin</dc:creator>
		<pubDate>Mon, 27 Feb 2012 20:00:26 +0000</pubDate>
		<guid isPermaLink="false">http://boost-spirit.com/home/?p=1039#comment-47091</guid>
		<description>Would you mind explaining why you need the &lt;code&gt;lbuff&lt;/code&gt; field in the fast_string union? I see that it has the size &lt;code&gt;buff_size / (sizeof(long) / sizeof(char))&lt;/code&gt;; why that size specifically?

You seem to use during utree initialization before assigning a value. My first thought was that its purpose is to zero out the memory, but then why would you need an extra union field?</description>
		<content:encoded><![CDATA[<p>Would you mind explaining why you need the <code>lbuff</code> field in the fast_string union? I see that it has the size <code>buff_size / (sizeof(long) / sizeof(char))</code>; why that size specifically?</p>
<p>You seem to use during utree initialization before assigning a value. My first thought was that its purpose is to zero out the memory, but then why would you need an extra union field?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joel de Guzman</title>
		<link>http://boost-spirit.com/home/2010/03/11/s-expressions-and-variants/comment-page-1/#comment-28899</link>
		<dc:creator>Joel de Guzman</dc:creator>
		<pubDate>Mon, 30 May 2011 06:44:10 +0000</pubDate>
		<guid isPermaLink="false">http://boost-spirit.com/home/?p=1039#comment-28899</guid>
		<description>1) size constraints. std::list is 16 bytes last I checked (32 bit compiler) 2) I needed to keep the elements in the variant PODs to simplify the implementation. It&#039;s a lot easier this way than having to rewrite variant for our very tuned and specific application.</description>
		<content:encoded><![CDATA[<p>1) size constraints. std::list is 16 bytes last I checked (32 bit compiler) 2) I needed to keep the elements in the variant PODs to simplify the implementation. It&#8217;s a lot easier this way than having to rewrite variant for our very tuned and specific application.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Olaf</title>
		<link>http://boost-spirit.com/home/2010/03/11/s-expressions-and-variants/comment-page-1/#comment-28897</link>
		<dc:creator>Olaf</dc:creator>
		<pubDate>Mon, 30 May 2011 06:17:00 +0000</pubDate>
		<guid isPermaLink="false">http://boost-spirit.com/home/?p=1039#comment-28897</guid>
		<description>Only for interest: Why do you wrote your own list implementation and don&#039;t use std::list? Why is there no allocator interface like the std::list has which would allow to use pools, e.g. boost&#039;s fast_pool_allocator? Would be any benefit from them?</description>
		<content:encoded><![CDATA[<p>Only for interest: Why do you wrote your own list implementation and don&#8217;t use std::list? Why is there no allocator interface like the std::list has which would allow to use pools, e.g. boost&#8217;s fast_pool_allocator? Would be any benefit from them?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joel de Guzman</title>
		<link>http://boost-spirit.com/home/2010/03/11/s-expressions-and-variants/comment-page-1/#comment-27862</link>
		<dc:creator>Joel de Guzman</dc:creator>
		<pubDate>Tue, 17 May 2011 09:16:26 +0000</pubDate>
		<guid isPermaLink="false">http://boost-spirit.com/home/?p=1039#comment-27862</guid>
		<description>Optionals are just T &#124; nil
utree is inherently recursive</description>
		<content:encoded><![CDATA[<p>Optionals are just T | nil<br />
utree is inherently recursive</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Olaf</title>
		<link>http://boost-spirit.com/home/2010/03/11/s-expressions-and-variants/comment-page-1/#comment-27850</link>
		<dc:creator>Olaf</dc:creator>
		<pubDate>Tue, 17 May 2011 05:32:23 +0000</pubDate>
		<guid isPermaLink="false">http://boost-spirit.com/home/?p=1039#comment-27850</guid>
		<description>How can I handle optional, even rekursive??</description>
		<content:encoded><![CDATA[<p>How can I handle optional, even rekursive??</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Xavi Gratal</title>
		<link>http://boost-spirit.com/home/2010/03/11/s-expressions-and-variants/comment-page-1/#comment-9752</link>
		<dc:creator>Xavi Gratal</dc:creator>
		<pubDate>Fri, 22 Oct 2010 18:32:43 +0000</pubDate>
		<guid isPermaLink="false">http://boost-spirit.com/home/?p=1039#comment-9752</guid>
		<description>That looks good. I will certainly have a use for this. 
But I have a concern... isn&#039;t storing members of a union as one type and then reading them as another forbidden by the standard. IIRC it breaks the strict-aliasing rule, and it can cause problems with certain compilers that do optimization taking advantage of the aliasing rules.
It would probably be better to store it as an unsigned char array and then cast as needed (casting to and from char pointers is allowed by the standard).</description>
		<content:encoded><![CDATA[<p>That looks good. I will certainly have a use for this.<br />
But I have a concern&#8230; isn&#8217;t storing members of a union as one type and then reading them as another forbidden by the standard. IIRC it breaks the strict-aliasing rule, and it can cause problems with certain compilers that do optimization taking advantage of the aliasing rules.<br />
It would probably be better to store it as an unsigned char array and then cast as needed (casting to and from char pointers is allowed by the standard).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dainis</title>
		<link>http://boost-spirit.com/home/2010/03/11/s-expressions-and-variants/comment-page-1/#comment-7519</link>
		<dc:creator>Dainis</dc:creator>
		<pubDate>Thu, 16 Sep 2010 01:33:32 +0000</pubDate>
		<guid isPermaLink="false">http://boost-spirit.com/home/?p=1039#comment-7519</guid>
		<description>Thanks Hartmut, that works, just now I understand that if 
utree is constructed as list , only makes a sense  to construct it as list of 
of utrees ;-)</description>
		<content:encoded><![CDATA[<p>Thanks Hartmut, that works, just now I understand that if<br />
utree is constructed as list , only makes a sense  to construct it as list of<br />
of utrees <img src='http://boost-spirit.com/home/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>

