Philip Martin wrote:
> Philip Martin<philip.martin_at_wandisco.com> writes:
>> stefan2_at_apache.org writes:
>>> Author: stefan2
>>> Date: Thu May 3 07:16:11 2012
>>> New Revision: 1333326
>>> Introduce private API functions that wrap apr_hash_make_custom
>>> and return hash tables that are 2 to 4 times faster than the APR default.
>> How do you benchmark something like that? What is 2 to 4 times faster?
>> Is it the runtime of the function? Does it include or exclude function
>> call overhead? What sort of data? Is it relatively short data like
>> paths or much larger data?
This patch is about two things:
* become (somewhat) independent of changes to the
APR default hash function
* make building hashes and data lookup faster (2 .. 4 times)
IMO, the first point alone would warrant the usage of the
I originally wrote the hash functions for the revprop caching
(whole hash gets read from cache but often only one entry
will eventually be used). So, the keys were quite short. Also,
the largest speedup is being reached when the key length
is known in advance - which is the case for cached items.
> Is the hash function showing up as significant when you profile
> Subversion on some workload?
(Rev)prop or directory heavy operations should benefit
significantly. For a fair benchmark, I simply profiled svnserve
when running the "large_dirs.sh" benchmark against it. So,
for a mixture of 'svn ls', 'svn co' and 'svn ci', the overall
speedup was still 1.5% when all calls to apr_hash_make
were replaced with svn_hash__make.
Received on 2012-05-06 02:25:03 CEST