


<?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/">
<channel>
<title>DBO Forums - Agreed</title>
<link>https://destiny.bungie.org/forum/</link>
<description>Bungie.Org talks Destiny</description>
<language>en</language>
<item>
<title>Agreed (reply)</title>
<content:encoded><![CDATA[<p>Insomniac definitely had a pretty tricky in place array sort in their code test.</p>
]]></content:encoded>
<link>https://destiny.bungie.org/forum/index.php?id=16884</link>
<guid>https://destiny.bungie.org/forum/index.php?id=16884</guid>
<pubDate>Sat, 26 Oct 2013 18:18:59 +0000</pubDate>
<category>Off-Topic</category><dc:creator>kidtsunami</dc:creator>
</item>
<item>
<title>I Vaguely Remember Doing This (reply)</title>
<content:encoded><![CDATA[<blockquote><p>This is probably the last time you'll ever write these sorting algorithms</p>
</blockquote><p>Unless he decides to interview for a programming job within 5 years after graduation.</p>
]]></content:encoded>
<link>https://destiny.bungie.org/forum/index.php?id=16879</link>
<guid>https://destiny.bungie.org/forum/index.php?id=16879</guid>
<pubDate>Sat, 26 Oct 2013 15:52:46 +0000</pubDate>
<category>Off-Topic</category><dc:creator>Schooly D</dc:creator>
</item>
<item>
<title>Yah, just use the libraries... (reply)</title>
<content:encoded><![CDATA[<p>A wise man once told me:</p>
<p>&quot;A good programmer knows how to write good code,<br />
but a <em>great</em> programmer knows how to <em>steal</em> good code.&quot;</p>
<p>;)</p>
]]></content:encoded>
<link>https://destiny.bungie.org/forum/index.php?id=16780</link>
<guid>https://destiny.bungie.org/forum/index.php?id=16780</guid>
<pubDate>Wed, 23 Oct 2013 23:18:49 +0000</pubDate>
<category>Off-Topic</category><dc:creator>RC</dc:creator>
</item>
<item>
<title>QuickSort conclusion (reply)</title>
<content:encoded><![CDATA[<p>Three randoms should work well. If you want to go all out, you could also implement switching to insertion sort once you're dealing with small arrays (around size 10 or so).</p>
<p>You can read up on it here: <a href="http://algs4.cs.princeton.edu/23quicksort/">http://algs4.cs.princeton.edu/23quicksort/</a></p>
<p>Let me know if the median pivot works well!</p>
]]></content:encoded>
<link>https://destiny.bungie.org/forum/index.php?id=16779</link>
<guid>https://destiny.bungie.org/forum/index.php?id=16779</guid>
<pubDate>Wed, 23 Oct 2013 23:04:57 +0000</pubDate>
<category>Off-Topic</category><dc:creator>Samusaaron3</dc:creator>
</item>
<item>
<title>QuickSort conclusions (reply)</title>
<content:encoded><![CDATA[<p>Cool, I think I will.</p>
<p>How do you choose the three? Beginning, middle, end? Three randoms?</p>
]]></content:encoded>
<link>https://destiny.bungie.org/forum/index.php?id=16776</link>
<guid>https://destiny.bungie.org/forum/index.php?id=16776</guid>
<pubDate>Wed, 23 Oct 2013 21:27:33 +0000</pubDate>
<category>Off-Topic</category><dc:creator>marmot 1333</dc:creator>
</item>
<item>
<title>I Vaguely Remember Doing This (reply)</title>
<content:encoded><![CDATA[<p>This is probably the last time you'll ever write these sorting algorithms, enjoy it while it lasts. :)</p>
]]></content:encoded>
<link>https://destiny.bungie.org/forum/index.php?id=16775</link>
<guid>https://destiny.bungie.org/forum/index.php?id=16775</guid>
<pubDate>Wed, 23 Oct 2013 21:23:38 +0000</pubDate>
<category>Off-Topic</category><dc:creator>Blackt1g3r</dc:creator>
</item>
<item>
<title>QuickSort conclusions (reply)</title>
<content:encoded><![CDATA[<p>You should experiment using the median-of-three method for choosing a pivot, and see how much faster you might be able to make it go :)</p>
<p>Very cool to see your results!</p>
]]></content:encoded>
<link>https://destiny.bungie.org/forum/index.php?id=16773</link>
<guid>https://destiny.bungie.org/forum/index.php?id=16773</guid>
<pubDate>Wed, 23 Oct 2013 20:31:36 +0000</pubDate>
<category>Off-Topic</category><dc:creator>Samusaaron3</dc:creator>
</item>
<item>
<title>QuickSort conclusions (reply)</title>
<content:encoded><![CDATA[<p>I'm not into any complex sorting algorithms yet, but I did successfully complete the IPC assignment I mentioned in that thread with few issues. Now I know how to effectively share memory and communicate between processes to create a distributed workload. Yay!</p>
]]></content:encoded>
<link>https://destiny.bungie.org/forum/index.php?id=16772</link>
<guid>https://destiny.bungie.org/forum/index.php?id=16772</guid>
<pubDate>Wed, 23 Oct 2013 20:18:01 +0000</pubDate>
<category>Off-Topic</category><dc:creator>GrizzNKev</dc:creator>
</item>
<item>
<title>It&#039;s like he&#039;s trying to tell me something! (reply)</title>
<content:encoded><![CDATA[<p>I have absolutely no clue about which you speak. Further evidence that most people are way smarter than I am.</p>
]]></content:encoded>
<link>https://destiny.bungie.org/forum/index.php?id=16771</link>
<guid>https://destiny.bungie.org/forum/index.php?id=16771</guid>
<pubDate>Wed, 23 Oct 2013 19:06:23 +0000</pubDate>
<category>Off-Topic</category><dc:creator>Oholiab</dc:creator>
</item>
<item>
<title>QuickSort conclusions</title>
<content:encoded><![CDATA[<p>There was some interest in my Java-based Quicksort project but that thread got locked.</p>
<p>To update: I was using an algorithm out of my book that used the right-most value as pivot. This led to the partitions being extremely unbalanced (8191 vs 1 in case of 2^13) and led to stack overflows starting at 2^13.</p>
<p>So I just updated my algorithm to utilize randomized quicksort; it chooses a pseudo-random element in the array and uses that as pivot. This solved my stack overflows as I was able to sort up to 2^20 for sorted, reverse sorted, and shuffled arrays with no problem.</p>
<p>So I guess I was lucky, Sekhmet, because my quicksort was performing faster than heapsort on the largest set (2^20). Here's some sample output.</p>
<pre><code>
Starting a HeapSort with n sorted numbers, where n = 1048576
Time to sort 1048576 sorted entries with Heapsort was 1015 milliseconds.
[(1): 1]
[(524288): 524288]
[(1048576): 1048576]
...
Starting a HeapSort with n reversed numbers, where n = 1048576
Time to sort 1048576 reversed entries with Heapsort was 886 milliseconds.
[(1): 1]
[(524288): 524288]
[(1048576): 1048576]
...
Starting a HeapSort with n shuffled numbers, where n = 1048576
Time to sort 1048576 shuffled entries with Heapsort was 1483 milliseconds.
[(1): 1]
[(524288): 524288]
[(1048576): 1048576]
...
Before sorting the array is:
[(1): 1]
[(524288): 524288]
[(1048576): 1048576]
Starting a QuickSort with n sorted numbers, where n = 1048576
Time to sort 1048576 sorted entries with QuickSort was 396 milliseconds.
After sorting the array is:
[(1): 1]
[(524288): 524288]
[(1048576): 1048576]
...
Before sorting the array is:
[(1): 1048576]
[(524288): 524289]
[(1048576): 1]
Starting a QuickSort with n reversed numbers, where n = 1048576
Time to sort 1048576 reversed entries with QuickSort was 400 milliseconds.
After sorting the array is:
[(1): 1]
[(524288): 524288]
[(1048576): 1048576]
...
Before sorting the array is:
[(1): 857704]
[(524288): 190051]
[(1048576): 792221]
Starting a QuickSort with n shuffled numbers, where n = 1048576
Time to sort 1048576 shuffled entries with QuickSort was 481 milliseconds.
After sorting the array is:
[(1): 1]
[(524288): 524288]
[(1048576): 1048576]</code></pre>]]></content:encoded>
<link>https://destiny.bungie.org/forum/index.php?id=16766</link>
<guid>https://destiny.bungie.org/forum/index.php?id=16766</guid>
<pubDate>Wed, 23 Oct 2013 15:58:02 +0000</pubDate>
<category>Off-Topic</category><dc:creator>marmot 1333</dc:creator>
</item>
</channel>
</rss>
