Re: XDL_FAST_HASH can be very slow

2014-12-22 Thread demerphq
(sorry for the repost, I use gmail and it send html mails by default). On 22 December 2014 at 11:48, Thomas Rast wrote: > > 1. hash function throughput > 2. quality of the hash values > 3. avoiding collision attacks > > XDL_FAST_HASH was strictly an attempt to improve throughput, and fairly > succ

Re: XDL_FAST_HASH can be very slow

2014-12-22 Thread Thomas Rast
Patrick Reynolds writes: > The original xdl_hash_record is essentially DJB hash, which does a > multiplication, load, and xor for each byte of the input. Commit > 6942efc introduces an "XDL_FAST_HASH" version of the same function > that is clearly inspired by the DJB hash, but it does only one >

Re: XDL_FAST_HASH can be very slow

2014-12-22 Thread Patrick Reynolds
I have been working with Peff on this and have more results to share. For background, xdl_hash_record is a hashing function, producing an unsigned long from an input string terminated by either a newline or the end of the mmap'd file. The original xdl_hash_record is essentially DJB hash, which do

XDL_FAST_HASH can be very slow

2014-12-21 Thread Jeff King
I ran across an interesting case that diffs very slowly with modern git. And it's even public. You can clone: git://github.com/outpunk/evil-icons and try: git show fc4efe426d5b4e6aa8d5a4dc14babeada7c5f899 (which is also the tip of master as of this writing). The interesting file there is a