<?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: STL lower_bound: set vs. list</title>
	<atom:link href="http://www.sambal.org/2008/10/stl-lower_bound-set-vs-list/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sambal.org/2008/10/stl-lower_bound-set-vs-list/</link>
	<description>Trying to avoid labels</description>
	<pubDate>Thu, 11 Mar 2010 22:12:41 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Alex Stapleton</title>
		<link>http://www.sambal.org/2008/10/stl-lower_bound-set-vs-list/comment-page-1/#comment-85</link>
		<dc:creator>Alex Stapleton</dc:creator>
		<pubDate>Sat, 04 Oct 2008 14:27:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.sambal.org/?p=724#comment-85</guid>
		<description>It would be interesting to see these tests run on hardware that was more typical back around 2000. Presumably the algorithm used was chosen for a reason at the time?

There doesn't seem to be any reason that lower_bound couldn't be specialised for _List_iterator in the GNU (based on SGI) implementation. You could probably even  specialise it yourself without having to patch your vendors implementation.</description>
		<content:encoded><![CDATA[<p>It would be interesting to see these tests run on hardware that was more typical back around 2000. Presumably the algorithm used was chosen for a reason at the time?</p>
<p>There doesn&#8217;t seem to be any reason that lower_bound couldn&#8217;t be specialised for _List_iterator in the GNU (based on SGI) implementation. You could probably even  specialise it yourself without having to patch your vendors implementation.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: attractivechaos</title>
		<link>http://www.sambal.org/2008/10/stl-lower_bound-set-vs-list/comment-page-1/#comment-84</link>
		<dc:creator>attractivechaos</dc:creator>
		<pubDate>Fri, 03 Oct 2008 09:22:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.sambal.org/?p=724#comment-84</guid>
		<description>Sorry, I made a wrong conclusion again. You are right. I realize that insertion on a red-black tree is only amortized O(1), not the worst case. Thanks for the clarification.</description>
		<content:encoded><![CDATA[<p>Sorry, I made a wrong conclusion again. You are right. I realize that insertion on a red-black tree is only amortized O(1), not the worst case. Thanks for the clarification.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: attractivechaos</title>
		<link>http://www.sambal.org/2008/10/stl-lower_bound-set-vs-list/comment-page-1/#comment-83</link>
		<dc:creator>attractivechaos</dc:creator>
		<pubDate>Fri, 03 Oct 2008 09:15:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.sambal.org/?p=724#comment-83</guid>
		<description>It is not clear to me that whether wiki is saying insertion after finding the postion requires O(log(N)) time. The overall insertion time is no doubt O(log(N)).

Please see the discussion here:

http://discuss.fogcreek.com/joelonsoftware/default.asp?cmd=show&amp;ixPost=22948

This page looks more professional. In addition, if you look at the source code, rebalancing after insertion only need to fix red nodes around the insertion point. There are at most two such nodes in a red-black tree after immediate insertion. Rebalancing after deletion need to fix black nodes above the deletion point. This can be O(log(N)).</description>
		<content:encoded><![CDATA[<p>It is not clear to me that whether wiki is saying insertion after finding the postion requires O(log(N)) time. The overall insertion time is no doubt O(log(N)).</p>
<p>Please see the discussion here:</p>
<p><a href="http://discuss.fogcreek.com/joelonsoftware/default.asp?cmd=show&amp;ixPost=22948" rel="nofollow">http://discuss.fogcreek.com/joelonsoftware/default.asp?cmd=show&amp;ixPost=22948</a></p>
<p>This page looks more professional. In addition, if you look at the source code, rebalancing after insertion only need to fix red nodes around the insertion point. There are at most two such nodes in a red-black tree after immediate insertion. Rebalancing after deletion need to fix black nodes above the deletion point. This can be O(log(N)).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sam</title>
		<link>http://www.sambal.org/2008/10/stl-lower_bound-set-vs-list/comment-page-1/#comment-81</link>
		<dc:creator>Sam</dc:creator>
		<pubDate>Thu, 02 Oct 2008 22:16:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.sambal.org/?p=724#comment-81</guid>
		<description>Amortized O(1), worst-case is O( lg N ) because you may have to make up to lg N rotations to restore the red-black property.  See e.g, CLR 1st ed p. 268, or Wikipedia: http://en.wikipedia.org/wiki/Red-black_tree#Complexity</description>
		<content:encoded><![CDATA[<p>Amortized O(1), worst-case is O( lg N ) because you may have to make up to lg N rotations to restore the red-black property.  See e.g, CLR 1st ed p. 268, or Wikipedia: <a href="http://en.wikipedia.org/wiki/Red-black_tree#Complexity" rel="nofollow">http://en.wikipedia.org/wiki/Red-black_tree#Complexity</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: attractivechaos</title>
		<link>http://www.sambal.org/2008/10/stl-lower_bound-set-vs-list/comment-page-1/#comment-80</link>
		<dc:creator>attractivechaos</dc:creator>
		<pubDate>Thu, 02 Oct 2008 22:07:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.sambal.org/?p=724#comment-80</guid>
		<description>On a red-black tree, once you find the insertion position, insertion can be done in O(1) time, not O(log(N)).</description>
		<content:encoded><![CDATA[<p>On a red-black tree, once you find the insertion position, insertion can be done in O(1) time, not O(log(N)).</p>
]]></content:encoded>
	</item>
</channel>
</rss>
