24.12.2015 20:07, Dimitry Sibiryakov wrote:
>
> Yes. But in this case the hash is only used internally and not stored 
> anywhere. Because
> of this, different platforms can use different algorithms for it.

Of course, but then it should be encapsulated and moved to /common to 
avoid the same #ifdefs used here and there. This algorithm is used twice 
or thrice in our code, IIRC.

> I suspect that "true hash" could make distribution of hash values more equival
> and thus improve overall timing for lock table search.

A couple of years ago I played a bit with different hash functions that 
are considered good nowadays. Quite surprisingly, none of them provided 
consistently better value distribution.

> On the other hand, CS is going down, so lock manager performance may be not a 
> critical
> part anymore?

Maybe not, but hash tables may still be used in other places and they're 
quite important from the performance POV. For example, hash joins use 
the same hash function.


Dmitry


------------------------------------------------------------------------------
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to