<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 25, 2014 at 2:30 PM, Chandler Carruth <span dir="ltr"><<a href="mailto:chandlerc@google.com" target="_blank">chandlerc@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Pack the bits of the enum into a 64-bit integer. When we fill the integer, spin up an MD5 context, and shove the integer through it, rinse, repeat. When done, if you have an MD5, take the upper 64-bits. If not, just take the integer.</blockquote>
</div><br>As a co-worker who also works on hashing just reminded me, this relies on the fact that none of the enum values are 0, otherwise you end up with 'x' and 'yx' for two sequences which trivially collide.</div>
</div>