ccache is a popular tool for speeding recompilation with GCC and other compilers. It works by caching previous compilations and detecting when the same compilation is done again. The detection is done using MD4 hashes.
I am curious as to (a) why such a caching tool would use any cryptographic hash function, and (b) of all the cryptographic hash functions available, why MD4 in particular would be used.
Regarding (a), what's the benefit of using a cryptographic hash function, as opposed to some hash function not designed with cryptography in mind? For example, Java's built-in hash functions don't seem to correspond to known ones used (or formerly used) in cryptography. Why not use one of these non-cryptographic hash functions instead? Given MD4's known weaknesses, I can't imagine that it would be chosen out of a desire for greater security.
Regarding (b), assuming that there is some basis for using a cryptographic hash, why MD4 in particular? I understand that it wouldn't make sense to use a modern cryptographic hash function, since these are generally computationally intensive, which defeats a caching tool's purpose of speeding up access times. So MD4 must be used at least in part for speed. But is it absolutely the fastest cryptographic hash function, or are there others that are faster? If it's not the fastest, what other advantages would MD4 have (over, for example, MD5) for use in caching?