[ccache] [Patch] Faster direct-mode hash

Justin Lebar justin.lebar at gmail.com
Mon Nov 8 15:06:39 MST 2010


> The improved search for __{DATE,TIME}__ is uncontroversial, so that can be
> applied right away. However, I would like to make the
> LFG-based digest opt-in, at least for now, since I think we
> need time to test it and to collect hash-savvy people's opinions.

That sounds pretty reasonable to me.  In this case, you'll probably
just want to substitute the patch's fast_hash_buffer() call with
hash_buffer() -- that is, don't accumulate the string to hash one
character at a time like the code currently does.

> By the way, can you provide some reference to why LFG (and the properties
> you chose) would work well as a digest for ccache's purpose? What's the
> expected collision rate? Or in other words: how well can we sleep at night,
> knowing that we haven't messed up people's builds, if we would introduce the
> LFG-based algorithm? :-)

I don't have as good a reason as I should; I was just implementing
Michael Niedermayer <michaelni at gmx.at>'s suggestion from the previous
thread, as it seemed pretty reasonable.  Hopefully he can justify my
decision for me.  :D

-Justin


More information about the ccache mailing list