There are some places where we use svn_revnum_t as keys in an apr_hash_t
and it turns out that APR's default hash function doesn't work very well
in this case. For the load revmap hash it is possible for over 96% of the
revnums added to the hash to be in hash collision chains, meaning that
most hash lookups will degrade to a linked list scan. Subversion has an
alternative hash function, available via svn_hash__make(), that works
much better in this case, so use it.
* subversion/libsvn_repos/load-fs-vtable.c
(struct parse_baton): Add comment.
(svn_repos_get_fs_build_parser6): Use svn_hash__make.
* subversion/libsvn_repos/reporter.c
(struct report_baton_t): Add comment.
(svn_repos_begin_report3): Use svn_hash__make.
* tools/dev/hash-test.c: New.
git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1908751 13f79535-47bb-0310-9956-ffa450edef68
3 files changed