<?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>Just feel my simple life... &#187; DJBHash</title>
	<atom:link href="http://youjf.com/tag/djbhash/feed/" rel="self" type="application/rss+xml" />
	<link>http://youjf.com</link>
	<description>Just feel my simple life...</description>
	<lastBuildDate>Mon, 28 Jun 2010 07:55:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Hash Tiems33算法,以及Hash Table表优化配置</title>
		<link>http://youjf.com/2007/12/14/hash-tiems33%e7%ae%97%e6%b3%95%e4%bb%a5%e5%8f%8ahash-table%e8%a1%a8%e4%bc%98%e5%8c%96%e9%85%8d%e7%bd%ae/</link>
		<comments>http://youjf.com/2007/12/14/hash-tiems33%e7%ae%97%e6%b3%95%e4%bb%a5%e5%8f%8ahash-table%e8%a1%a8%e4%bc%98%e5%8c%96%e9%85%8d%e7%bd%ae/#comments</comments>
		<pubDate>Fri, 14 Dec 2007 06:05:35 +0000</pubDate>
		<dc:creator>Jeffery</dc:creator>
				<category><![CDATA[我的日记]]></category>
		<category><![CDATA[DJBHash]]></category>
		<category><![CDATA[Hash]]></category>
		<category><![CDATA[Times33]]></category>

		<guid isPermaLink="false">http://www.youjf.com:8080/2007/12/14/hash-tiems33%e7%ae%97%e6%b3%95%e4%bb%a5%e5%8f%8ahash-table%e8%a1%a8%e4%bc%98%e5%8c%96%e9%85%8d%e7%bd%ae/</guid>
		<description><![CDATA[这里有一份Hash表的大小配置,据说是比较优化的表容量配置 原文地址: http://planetmath.org/encyclopedia/GoodHashTablePrimes.html 53, 97, 193, 389, 769, 1543, 3079, 6151, 12289, 24593, 49157, 98317, 196613, 393241, 786433, 1572869, 3145739, 6291469, 12582917, 25165843, 50331653, 100663319, 201326611, 402653189, 805306457, 161061274 还有就是所谓的 Times33算法也就是DJBHash算法 以下是JAVA版 public long DJBHash(String str) { long hash = 5381; for(int i = 0; i &#60; str.length(); i++) { //hash = hash * 33 [...]]]></description>
			<content:encoded><![CDATA[<p>这里有一份Hash表的大小配置,据说是比较优化的表容量配置</p>
<p>原文地址: <a href="http://planetmath.org/encyclopedia/GoodHashTablePrimes.html" target="_blank">http://planetmath.org/encyclopedia/GoodHashTablePrimes.html</a></p>
<p>53, 97, 193, 389, 769, 1543, 3079, 6151, 12289, 24593, 49157, 98317,<br />
196613, 393241, 786433, 1572869, 3145739, 6291469, 12582917, 25165843,<br />
50331653, 100663319, 201326611, 402653189, 805306457, 161061274</p>
<p>还有就是所谓的 Times33算法也就是DJBHash算法</p>
<p>以下是JAVA版</p>
<blockquote><p>   public long DJBHash(String str)<br />
{<br />
long hash = 5381;</p>
<p>for(int i = 0; i &lt; str.length(); i++)<br />
{</p>
<p>//hash = hash * 33 +str.charAt(i);<br />
hash = ((hash &lt;&lt; 5) + hash) + str.charAt(i);<br />
}</p>
<p>return hash;<br />
}</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://youjf.com/2007/12/14/hash-tiems33%e7%ae%97%e6%b3%95%e4%bb%a5%e5%8f%8ahash-table%e8%a1%a8%e4%bc%98%e5%8c%96%e9%85%8d%e7%bd%ae/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
