<?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: Efficient update of stl containers</title>
	<atom:link href="http://entland.homelinux.com/blog/2006/05/17/efficient-update-of-stl-containers/feed/" rel="self" type="application/rss+xml" />
	<link>http://entland.homelinux.com/blog/2006/05/17/efficient-update-of-stl-containers/</link>
	<description>Code, 3D, Games, Linux and much more...</description>
	<lastBuildDate>Mon, 09 Nov 2009 03:12:38 +0100</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: ent</title>
		<link>http://entland.homelinux.com/blog/2006/05/17/efficient-update-of-stl-containers/comment-page-1/#comment-27610</link>
		<dc:creator>ent</dc:creator>
		<pubDate>Thu, 05 Jul 2007 11:29:41 +0000</pubDate>
		<guid isPermaLink="false">http://entland.homelinux.com/blog/2006/05/17/efficient-update-of-stl-containers/#comment-27610</guid>
		<description>Yes, Steve, good point. I have just checked that with Visual Studio 2005 SP1.

iterator insert(iterator, const value_type&amp; _Val)
{	// try to insert node with value _Val, ignore hint
	return (insert(_Val).first);
}

Anyway, insertions in the hash_ containers are O(1), so it is not as serious as it could be in the sorted containers (map, set, etc). 

Option 2 seems to be the better option for this containers then.

Thanks,</description>
		<content:encoded><![CDATA[<p>Yes, Steve, good point. I have just checked that with Visual Studio 2005 SP1.</p>
<p>iterator insert(iterator, const value_type&#038; _Val)<br />
{	// try to insert node with value _Val, ignore hint<br />
	return (insert(_Val).first);<br />
}</p>
<p>Anyway, insertions in the hash_ containers are O(1), so it is not as serious as it could be in the sorted containers (map, set, etc). </p>
<p>Option 2 seems to be the better option for this containers then.</p>
<p>Thanks,</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steven</title>
		<link>http://entland.homelinux.com/blog/2006/05/17/efficient-update-of-stl-containers/comment-page-1/#comment-27589</link>
		<dc:creator>Steven</dc:creator>
		<pubDate>Thu, 05 Jul 2007 08:55:54 +0000</pubDate>
		<guid isPermaLink="false">http://entland.homelinux.com/blog/2006/05/17/efficient-update-of-stl-containers/#comment-27589</guid>
		<description>Just a little note - the third variant will be fast as predicted for set and map, but not for hash_map and hash_set, because the VC2005 implementation of insert(iterator,value) method of these containers simply ignores the hint iterator.

Although you can find the following text for hash_map and hash_set in MSDN,

&quot;Insertion can occur in amortized constant time for the hint version of insert, instead of logarithmic time, if the insertion point immediately follows _Where.&quot;

It is not true...</description>
		<content:encoded><![CDATA[<p>Just a little note &#8211; the third variant will be fast as predicted for set and map, but not for hash_map and hash_set, because the VC2005 implementation of insert(iterator,value) method of these containers simply ignores the hint iterator.</p>
<p>Although you can find the following text for hash_map and hash_set in MSDN,</p>
<p>&#8220;Insertion can occur in amortized constant time for the hint version of insert, instead of logarithmic time, if the insertion point immediately follows _Where.&#8221;</p>
<p>It is not true&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Juan</title>
		<link>http://entland.homelinux.com/blog/2006/05/17/efficient-update-of-stl-containers/comment-page-1/#comment-114</link>
		<dc:creator>Juan</dc:creator>
		<pubDate>Fri, 19 May 2006 16:28:14 +0000</pubDate>
		<guid isPermaLink="false">http://entland.homelinux.com/blog/2006/05/17/efficient-update-of-stl-containers/#comment-114</guid>
		<description>Hola Yisus

aja...aja...si...si...lo entiendo...si...si...

...

...

...

...

Está muy bien la canción, eres un gran cantautor.

...

...

JAJAJA</description>
		<content:encoded><![CDATA[<p>Hola Yisus</p>
<p>aja&#8230;aja&#8230;si&#8230;si&#8230;lo entiendo&#8230;si&#8230;si&#8230;</p>
<p>&#8230;</p>
<p>&#8230;</p>
<p>&#8230;</p>
<p>&#8230;</p>
<p>Está muy bien la canción, eres un gran cantautor.</p>
<p>&#8230;</p>
<p>&#8230;</p>
<p>JAJAJA</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fran Cadaval</title>
		<link>http://entland.homelinux.com/blog/2006/05/17/efficient-update-of-stl-containers/comment-page-1/#comment-113</link>
		<dc:creator>Fran Cadaval</dc:creator>
		<pubDate>Fri, 19 May 2006 07:10:31 +0000</pubDate>
		<guid isPermaLink="false">http://entland.homelinux.com/blog/2006/05/17/efficient-update-of-stl-containers/#comment-113</guid>
		<description>Pues la verda es que sí, me van muy bien las cosas, a ver si un día me doy una vuelta por &quot;Los Madriles&quot; y os hago una visita.

Respecto a la respuesta pues no me había fijado en ese detalle. Muchas gracias, ha sido muy interesante.</description>
		<content:encoded><![CDATA[<p>Pues la verda es que sí, me van muy bien las cosas, a ver si un día me doy una vuelta por &#8220;Los Madriles&#8221; y os hago una visita.</p>
<p>Respecto a la respuesta pues no me había fijado en ese detalle. Muchas gracias, ha sido muy interesante.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ent</title>
		<link>http://entland.homelinux.com/blog/2006/05/17/efficient-update-of-stl-containers/comment-page-1/#comment-111</link>
		<dc:creator>ent</dc:creator>
		<pubDate>Thu, 18 May 2006 18:53:13 +0000</pubDate>
		<guid isPermaLink="false">http://entland.homelinux.com/blog/2006/05/17/efficient-update-of-stl-containers/#comment-111</guid>
		<description>Que tal fran, ¿todo bien?

En el tercer modo se usa la versior de insert que recibe un iterador como primer parametro. Este iterador es una ayuda a la insercion. Si el iterador es correcto la inserción se garantiza en tiempo constante.</description>
		<content:encoded><![CDATA[<p>Que tal fran, ¿todo bien?</p>
<p>En el tercer modo se usa la versior de insert que recibe un iterador como primer parametro. Este iterador es una ayuda a la insercion. Si el iterador es correcto la inserción se garantiza en tiempo constante.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fran Cadaval</title>
		<link>http://entland.homelinux.com/blog/2006/05/17/efficient-update-of-stl-containers/comment-page-1/#comment-110</link>
		<dc:creator>Fran Cadaval</dc:creator>
		<pubDate>Thu, 18 May 2006 09:14:01 +0000</pubDate>
		<guid isPermaLink="false">http://entland.homelinux.com/blog/2006/05/17/efficient-update-of-stl-containers/#comment-110</guid>
		<description>Hola Jesús.

Me surge una duda. En el tercer modo ¿no se recorre también dos veces el mapa? En el primero se recorre, según dices, en el &lt;i&gt;find&lt;/i&gt; y en el &lt;i&gt;insert&lt;/i&gt;. Entonces, ¿no se hace también en el tercero con el método &lt;i&gt;lower_bound&lt;/i&gt; y con el &lt;i&gt;insert&lt;/i&gt;?

P.D.- Saluda de mi parte a los compañeros. Me acuerdo mucho de vosotros.</description>
		<content:encoded><![CDATA[<p>Hola Jesús.</p>
<p>Me surge una duda. En el tercer modo ¿no se recorre también dos veces el mapa? En el primero se recorre, según dices, en el <i>find</i> y en el <i>insert</i>. Entonces, ¿no se hace también en el tercero con el método <i>lower_bound</i> y con el <i>insert</i>?</p>
<p>P.D.- Saluda de mi parte a los compañeros. Me acuerdo mucho de vosotros.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
