<?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>Andreas Schneider &#187; algorithms</title>
	<atom:link href="http://blog.cryptomilk.org/tag/algorithms/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.cryptomilk.org</link>
	<description>a cosmological pedestrian</description>
	<lastBuildDate>Mon, 23 Jan 2012 09:21:09 +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>The pain of poll(2)?</title>
		<link>http://blog.cryptomilk.org/2010/09/05/the-pain-of-poll/</link>
		<comments>http://blog.cryptomilk.org/2010/09/05/the-pain-of-poll/#comments</comments>
		<pubDate>Sun, 05 Sep 2010 19:17:13 +0000</pubDate>
		<dc:creator>Andreas Schneider</dc:creator>
				<category><![CDATA[KDE]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[algorithms]]></category>
		<category><![CDATA[libssh]]></category>
		<category><![CDATA[SSH]]></category>

		<guid isPermaLink="false">http://blog.cynapses.org/?p=148</guid>
		<description><![CDATA[If you're working on a multi-platform project which does network communication you will end up thinking about replacing select(2) with poll(2) sooner or later. The problem with select are well known. poll(2) removes the limitations of select(2) and improves speed and features. The problem is that poll(2) isn't available on all platforms. This means ...]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re working on a multi-platform project which does network communication you will end up thinking about replacing select(2) with poll(2) sooner or later. The problem with select are well known. poll(2) removes the limitations of select(2) and improves speed and features. The problem is that poll(2) isn&#8217;t available on all platforms. This means you need a poll(2)-emulation or create wrappers around other similar poll() functions.</p>
<p>In <a href="http://www.libssh.org/">libssh</a> we use a <a href="http://git.libssh.org/projects/libssh.git/tree/src/poll.c">poll(2)-emulation</a> based on select for platforms which don&#8217;t provide a poll(2) function like some Windows versions or UNIX systems.</p>
<p>Windows Vista or newer version provide a poll(2) like function called <a href="http://msdn.microsoft.com/en-us/library/ms741669%28VS.85%29.aspx">WSAPoll()</a>. To be able to support this call which is faster the the poll(2)-emulation and allows to use more file descriptors we implemented a runtime detection for WSAPoll(). This means during initialization of the socket, we check if the functions can be found in the relevant library. If Windows doesn&#8217;t provide it, we fallback to the poll(2)-emulation.</p>
<p>I took several month to get this working correctly on UNIX and Windows. This feature starts to work correctly with <a href="http://www.libssh.org/2010/09/05/libssh-0-4-6/">libssh 0.4.6</a> released today.</p>
<p class="wp-flattr-button"></p>]]></content:encoded>
			<wfw:commentRss>http://blog.cryptomilk.org/2010/09/05/the-pain-of-poll/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Left-Leaning Red-Black Trees</title>
		<link>http://blog.cryptomilk.org/2008/03/26/left-leaning-red-black-trees/</link>
		<comments>http://blog.cryptomilk.org/2008/03/26/left-leaning-red-black-trees/#comments</comments>
		<pubDate>Wed, 26 Mar 2008 11:26:49 +0000</pubDate>
		<dc:creator>Andreas Schneider</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[algorithms]]></category>
		<category><![CDATA[research]]></category>

		<guid isPermaLink="false">http://blog.cynapses.org/2008/03/26/left-leaning-red-black-trees/</guid>
		<description><![CDATA[Red-Black Trees were originally designed by taking a 2-3-4 tree and unrolling the big nodes into a cluster of simpler binary tree nodes. The 2-3-4 node operations are mapped to binary tree operations. Now Robert Sedgewick presented a new tree called Left-Leaning Red-Black Tree.

A Red-Black tree has a lot of cases you have to ...]]></description>
			<content:encoded><![CDATA[<p>Red-Black Trees were originally designed by taking a 2-3-4 tree and unrolling the big nodes into a cluster of simpler binary tree nodes. The 2-3-4 node operations are mapped to binary tree operations. Now <a href="http://www.cs.princeton.edu/%7Ers/">Robert Sedgewick</a> presented a new tree called Left-Leaning Red-Black Tree.</p>
<p>A Red-Black tree has a lot of cases you have to consider, especially if you delete a node. This makes the code complex. Left-Leaning Red-Black Trees are a simpler variant of Red-Black Trees. They are simpler to implement (less code) while maintaining the nice features of Red-Black Trees. Less code means faster insertion and deletion, but there are no benchmarks yet.</p>
<p>Once Bob released his new book this would be a nice improvement for <a href="http://www.csync.org/">csync</a> in the future. You can <a href="http://www.cs.princeton.edu/%7Ers/talks/LLRB/RedBlack.pdf">take a look at the slides</a> of his talk.</p>
<p class="wp-flattr-button"></p>]]></content:encoded>
			<wfw:commentRss>http://blog.cryptomilk.org/2008/03/26/left-leaning-red-black-trees/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

