[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r1333326 - in /subversion/trunk/subversion: include/private/svn_hash_private.h libsvn_fs_fs/temp_serializer.c libsvn_subr/hash.c

From: Stefan Fuhrmann <eqfox_at_web.de>
Date: Sun, 06 May 2012 00:24:30 +0200

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
>>>
>>> URL:http://svn.apache.org/viewvc?rev=1333326&view=rev
>>> Log:
>>> 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
new function(s).

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.

-- Stefan^2.
Received on 2012-05-06 02:25:03 CEST

This is an archived mail posted to the Subversion Dev mailing list.