<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sat, Feb 1, 2014 at 8:35 AM, Stephan Tolksdorf <span dir="ltr"><<a href="mailto:st@quanttec.com" target="_blank">st@quanttec.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
Currently the hashing implementation in ADT/Hashing.h produces hash values on 32-bit platforms that differ from the lower 32-bits of the hash values produced on 64-bit platforms. It seems the only reason for this difference is that the uint64_t integer seed is truncated to size_t. Since the usage of uint64_t and size_t as types for seed values in the implementation is somewhat inconsistent, I'm wondering: Was this difference deliberately introduced as a performance optimization for 32-bit code, or is this maybe just an implementation artifact?<br>
<br>
I also noted that the implementation relies on implicit conversions from uint64_t to size_t in several places where hash_code values are returned, which may trigger compiler warnings on 32-bit platforms.</blockquote><div>
<br></div><div>Almost all of this was largely incidental on my part. I didn't spend a lot of time tuning the 32-bit platform performance. If you have ideas that you think would make things better, I'm certainly interested. =D</div>
<div><br></div><div>One thing I would note is that I would prefer to retain the collision resistance where possible. So I would be leery of reducing the internal state used. I would more focus on making the outputs friendly for 32-bit platforms and the inputs consistent.</div>
</div></div></div>