<?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: Shaving some time</title>
	<atom:link href="http://www.frozentux.net/2010/05/shaving-some-time/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.frozentux.net/2010/05/shaving-some-time/</link>
	<description>Yet another site</description>
	<lastBuildDate>Thu, 26 Jan 2012 01:46:05 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Oskar Andreasson</title>
		<link>http://www.frozentux.net/2010/05/shaving-some-time/comment-page-1/#comment-430</link>
		<dc:creator>Oskar Andreasson</dc:creator>
		<pubDate>Thu, 10 Feb 2011 19:41:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.frozentux.net/?p=605#comment-430</guid>
		<description>Yupp, you are both correct. There are several errors in that code. However, the interesting part isn&#039;t the return value per se, but the time difference in using a reference vs pointer and the cost of new/delete. Exactly as you both pointed out ;) .</description>
		<content:encoded><![CDATA[<p>Yupp, you are both correct. There are several errors in that code. However, the interesting part isn&#8217;t the return value per se, but the time difference in using a reference vs pointer and the cost of new/delete. Exactly as you both pointed out <img src='http://www.frozentux.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  .</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: J Austin</title>
		<link>http://www.frozentux.net/2010/05/shaving-some-time/comment-page-1/#comment-429</link>
		<dc:creator>J Austin</dc:creator>
		<pubDate>Sun, 06 Feb 2011 03:28:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.frozentux.net/?p=605#comment-429</guid>
		<description>Carl-Erwin is correct. The reference case uses a variable allocated on the stack and the reference that is returned is undefined because the referenced stack object no longer exists.

You would be better off to not use new and delete and just return a pointer to a variable on the stack. Violate the language in the same way in both cases. I&#039;ll bet performance is the same if you do it that way.</description>
		<content:encoded><![CDATA[<p>Carl-Erwin is correct. The reference case uses a variable allocated on the stack and the reference that is returned is undefined because the referenced stack object no longer exists.</p>
<p>You would be better off to not use new and delete and just return a pointer to a variable on the stack. Violate the language in the same way in both cases. I&#8217;ll bet performance is the same if you do it that way.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Carl-Erwin Griffith</title>
		<link>http://www.frozentux.net/2010/05/shaving-some-time/comment-page-1/#comment-350</link>
		<dc:creator>Carl-Erwin Griffith</dc:creator>
		<pubDate>Tue, 09 Nov 2010 10:00:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.frozentux.net/?p=605#comment-350</guid>
		<description>Hi,

The overhead you seen is caused by new/delete function calls
and the returned reference points into the stack :-)</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>The overhead you seen is caused by new/delete function calls<br />
and the returned reference points into the stack <img src='http://www.frozentux.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>

