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

Re: svn commit: r1495978 - /subversion/trunk/subversion/libsvn_fs_fs/tree.c

From: Daniel Shahaf <danielsh_at_apache.org>
Date: Mon, 24 Jun 2013 10:19:06 +0000

On Mon, Jun 24, 2013 at 10:15:31AM -0000, danielsh_at_apache.org wrote:
> Author: danielsh
> Date: Mon Jun 24 10:15:31 2013
> New Revision: 1495978
>
> URL: http://svn.apache.org/r1495978
> Log:
> Silence a compiler warning.
>
> * subversion/libsvn_fs_fs/tree.c
> (cache_lookup): Only declare FACTOR when it is used.
>
> Modified:
> subversion/trunk/subversion/libsvn_fs_fs/tree.c
>
> Modified: subversion/trunk/subversion/libsvn_fs_fs/tree.c
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/tree.c?rev=1495978&r1=1495977&r2=1495978&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/libsvn_fs_fs/tree.c (original)
> +++ subversion/trunk/subversion/libsvn_fs_fs/tree.c Mon Jun 24 10:15:31 2013
> @@ -342,8 +342,10 @@ cache_lookup( fs_fs_dag_cache_t *cache
> apr_size_t path_len = strlen(path);
> apr_uint32_t hash_value = (apr_uint32_t)revision;
>
> +#if SVN_UNALIGNED_ACCESS_IS_OK
> /* "randomizing" / distributing factor used in our hash function */
> const apr_uint32_t factor = 0xd1f3da69;
> +#endif
>

Is this the right fix? Right now, the !SVN_UNALIGNED_ACCESS_IS_OK hash
function is just (x[n] + 33^1 x[n-1] + ... + 33^(n-1) x[1] + 33^n x[0]).

Daniel

> /* optimistic lookup: hit the same bucket again? */
> cache_entry_t *result = &cache->buckets[cache->last_hit];
>
>
Received on 2013-06-24 12:19:17 CEST

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.