|
From: Christoph B. <bar...@or...> - 2006-10-24 21:08:13
|
Am Dienstag, 24. Oktober 2006 22:27 schrieb Julian Seward: > > > hash = (hash << 61) | (hash >> 3); > > > > > > leads to a better distribution of the values and better runtime for the > > > testcase. However I do not know whether rotation by 3 really leads to a > > > good hash function for 64 bit. > > > > Yeh, rotating by 3 is stupid and doesn't mix the bits well for short > > stack traces. I just tried this, which mixes much better: > > Below is my final patch. It works well (it seems) for both 32-bit > and 64-bit versions of your test program and contains a second > heuristic hack to guard against bad-case behaviour. Can you let me > know if it solves the problem convincingly? If so I will commit it. The patch works well for the testprogramm. Tomorrow I will be able to report whether it works for the real application. BTW, I see that valgrind is only compiled with -O -g and not -O2 -g. Is there a reason? Christoph |