if keys are uri which could go upto a few hundred bytes then md5 would make sense?<br>It all boils down the number of entries per bucket.<br>I could hash on only 8 bytes and use the other 8 bytes for actual comparison.<br>
<br><div><span class="gmail_quote">On 9/7/07, <b class="gmail_sendername">Dustin Sallings</b> &lt;<a href="mailto:dustin@spy.net">dustin@spy.net</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div style=""><span class="q"><br><div><div>On Sep 7, 2007, at 0:34, Venkatesh KS wrote:</div><br><blockquote type="cite"><span style="border-collapse: separate; border-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">
memcached supports variable length keys. But I am just curious as to why not use md5 instead of lengthy keys. The keylen requirements for my cache (which is very similar to&nbsp; squid proxy) is very high and I am planning on using md5. I will read up to find out about the false positive probability. But going md5 way will certainly cap the keylen to 16bytes.
<span>&nbsp;</span><br></span></blockquote></div><div><br></div></span><div><span style="white-space: pre;">        </span>You certainly can, but md5(``somestring&#39;&#39;) is a lot more costly to compute than ``somestring&#39;&#39;
</div><br><div> <span style="border-collapse: separate; border-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">
<div>--&nbsp;</div><div>Dustin Sallings</div><br></span> </div><br></div></blockquote></div><br>