<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>&#62;devblog_ &#187; Sorting</title>
	<atom:link href="http://devblog.itsth.com/tag/sorting/feed/" rel="self" type="application/rss+xml" />
	<link>http://devblog.itsth.com</link>
	<description>Thoughts on developing shareware</description>
	<lastBuildDate>Wed, 14 Dec 2011 16:29:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Dangerous QuickSort</title>
		<link>http://devblog.itsth.com/2009/05/15/dangerous-quicksort/</link>
		<comments>http://devblog.itsth.com/2009/05/15/dangerous-quicksort/#comments</comments>
		<pubDate>Fri, 15 May 2009 13:49:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[IntroSort]]></category>
		<category><![CDATA[QuickSort]]></category>
		<category><![CDATA[Sorting]]></category>
		<category><![CDATA[Stack]]></category>
		<category><![CDATA[Stack Overflow]]></category>

		<guid isPermaLink="false">http://devblog.itsth.com/?p=51</guid>
		<description><![CDATA[When it comes to sorting, QuickSort is an all-time-favourite (so I though) and I chose it for implementing a sortable list with data. In some cases (when there were on few changes), it didn&#8217;t perform well, to I switched to an old-fashioned bubble-sort in such cases. What I had to learn now, is that if [...]]]></description>
			<content:encoded><![CDATA[<p>When it comes to sorting, QuickSort is an all-time-favourite (so I though) and I chose it for implementing a sortable list with data. In some cases (when there were on few changes), it didn&#8217;t perform well, to I switched to an old-fashioned bubble-sort in such cases.</p>
<p>What I had to learn now, is that if the data that has to be sorted, is arranged in the right / unfortunate way, then QuickSort can easily crash your program by consuming excessively stack space and finally causing a stack overflow. You won&#8217;t need much data for this. 10,000 items is enough to perform terribly slow and finally crashing the software.</p>
<p>I switched to IntroSort, which seams to work better (so far) and (according to Wikipedia) behaves better in worst-scenarios than QuickSort. We&#8217;ll see. Sample implementations for IntroSort are rare, but I found one linked in <a href="http://www.codercorner.com/blog/?p=90">this blog</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://devblog.itsth.com/2009/05/15/dangerous-quicksort/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

