On Tue, May 13, 2014 at 10:37:05AM +0200, Richard Braun wrote: > It disappeared a few months ago, and since it's not widespread, I > suggest, despite providing to Justus in the first place, to use the > Murmur finalizer instead. But we need to test that part a bit more. > I'm currently doing just that.
Here are some results I could obtain : 1/ Using an extremely simple microbenchmark [1] that merely inserts keys, either random integers or sequential ones to match the way port names are managed, it seems that the previous code, despite its apparent flaws, did quite well. Using an integer hashing function actually reduces performance on the sequential integer test case. It makes sense because, considering a set of consecutive integers starting from 0, and a hash table that always has more slots than items, a modulo is a perfect hash function. Even when taking into account that only names for receive rights are normally managed with libihash, i.e. that keys aren't actually sequential, they are almost all equally distributed, leading to very few collisions. Therefore, as a third option, I've removed the hashing function, leaving only a fast modulo (an AND) and this variant provided the best raw results. 2/ I've also built hurd packages multiple times and got average build times with each variant (previous, new, new without hash function) and here are the results I obtained respectively : 52m59s, 52m31s, 52m22s. In the end, no surprise, but still a decent improvement. Good job :). -- Richard Braun [1] http://darnassus.sceen.net/gitweb/rbraun/ihtest.git