First of all, I tried it against a PHP5 codebase, not PHP7. I simply patched it about return type (casted it to our ulong , taking care of 32/64 platforms), then I very simply #define zend(_inline)_hash_func to mumurhash2.
Then I ran a callgrind on an extension of mine (closed source), that heavily makes use of zend_inline_hash_func. I noticed with callgrind result graph that this latter took twice less time when the macro was defined to target murmurhash2 than DJB33. And the zend_hash_quick_****() calls called later with such a hash did not seem to take longer time, though the collision rate stayed barely the same. This is a quick test as #defining in an extension is abviously not safe at all, but as I fully use the _quick_ API, the compiled PHP codebase doesnt make use of zend_hash_func itself (which would lead to DJB33) Julien.P On Tue, Jun 16, 2015 at 11:53 AM, Dmitry Stogov <dmi...@zend.com> wrote: > Hi Julien, > > Could you be more specific. From the first look MurmurHash2is more > expensive, but may be it reduces number of collisions. > what implementation(s) did you use (src or patch)? how did you measure the > speed? did you try to embed it into PHP? > > Thanks. Dmitry. >