<?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>Foognostic blogs &#187; bitunwise</title> <atom:link href="http://blogs.foognostic.net/topics/bitunwise/feed/" rel="self" type="application/rss+xml" /><link>http://blogs.foognostic.net</link> <description>Seeking knowledge of foo</description> <lastBuildDate>Thu, 24 Feb 2011 23:17:24 +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>Implementing xor in a bitunwise way</title><link>http://blogs.foognostic.net/2009/01/implementing-xor-in-a-bitunwise-way/</link> <comments>http://blogs.foognostic.net/2009/01/implementing-xor-in-a-bitunwise-way/#comments</comments> <pubDate>Sat, 10 Jan 2009 23:19:09 +0000</pubDate> <dc:creator>Seth Schroeder</dc:creator> <category><![CDATA[bitunwise]]></category> <category><![CDATA[c]]></category> <category><![CDATA[code]]></category> <category><![CDATA[bitbucket]]></category> <guid
isPermaLink="false">http://blogs.foognostic.net/?p=55</guid> <description><![CDATA[Bitunwise is one of my pet projects. It uses a common algorithm to reimplement memcpy, memset, memcmp, bzero, and kin. I decided to add support for xor'ing two byte streams. The first patch was small and easy to write, but it needed better abstraction. I took another look at the functions I was trying to [...]]]></description> <content:encoded><![CDATA[<p><a
href="http://www.bitbucket.org/seths/bitunwise/" target="_blank">Bitunwise</a> is one of my pet projects. It uses a common algorithm to reimplement memcpy, memset, memcmp, bzero, and kin. I decided to add support for xor'ing two byte streams. The <a
href="http://www.bitbucket.org/seths/bitunwise/changeset/111d05e5c880/#chg-bitunwise.c" target="_blank">first patch</a> was small and easy to write, but it needed better abstraction. I took another look at the functions I was trying to implement and realized they can be grouped by number of input streams:</p><ul><li>zero input streams: bzero</li><li>one input stream: memset, memcpy</li><li>two input streams: xor</li></ul><p>So now instead of calling into the <a
href="http://www.bitbucket.org/seths/bitunwise/src/ad2b47eb028d/bitunwise.c#cl-83" target="_blank">core algorithm</a> manually, the emitting functions call the appropriate arity helper method. It worked out to the same number of lines of code... BUT future emitting methods (e.g. nand) will be one or two liners.</p> ]]></content:encoded> <wfw:commentRss>http://blogs.foognostic.net/2009/01/implementing-xor-in-a-bitunwise-way/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
