lkml.org 
[lkml]   [2010]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Improve kconfig symbol hashing
On 13.1.2010 17:02, Andi Kleen wrote:
[...]
> This patch increases the hash table size to a larger prime
> and switches to a FNV32 hash. I played around with a couple of hash
> functions, but that one seemed to perform best with reasonable
> hash table sizes.
>
> Increasing the hash table size even further didn't
> seem like a good idea, because there are a couple of global
> walks which walk the complete hash table.
>
> I also moved the unnamed bucket to 0. It's still the longest
> of all the buckets (44 entries), but hopefully it's not
> often hit except for the global walk which doesn't care.
>
> The result is a much nicer distribution:
> (first column bucket length, second number of buckets with that length)
>
> 1: 3505
> 2: 1236
> 3: 294
> 4: 52
> 5: 3
> 47: 1 <--- this is the unnamed symbols bucket
>
> There are still some 5+ buckets, but increasing the hash table
> even more would be likely not worth it.
>
> This also cleans up the code slightly by removing hard coded
> magic numbers.
>
> I didn't notice a big performance difference either way
> on my Nehalem system, but I presume it'll help somewhat
> on slower systems.
>
> ---
> scripts/kconfig/expr.h | 5 ++---
> scripts/kconfig/symbol.c | 29 +++++++++++++++++------------
> scripts/kconfig/zconf.tab.c_shipped | 2 +-
> scripts/kconfig/zconf.y | 2 +-
> 4 files changed, 21 insertions(+), 17 deletions(-)

Hi Andi,

The patch looks ok, but you forgot your Signed-off-by line?

Michal


\
 
 \ /
  Last update: 2010-01-18 13:25    [W:0.057 / U:1.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site