On Tue, 30 Jun 2026 11:38:38 GMT, Peter Hull <[email protected]> wrote:

> Sorry for jumping in, I came across this by chance. In your 
> std::hash<FORMATETC> you are combining hashes just with "^". I believe this 
> could give hashes with a narrow distribution. For example the JDK does a 
> successive multiply and add (...)

Fair point! From STL's point of view any hash collisions will be resolved by a 
direct member-wise comparison, so a narrow hash isn't that worrying; these 
maps/sets are not that big it shouldn't matter much. But I agree that a 
different approach could be more efficient.

I'll look around a bit more for an alternative implementation and adjust it.

-------------

PR Comment: https://git.openjdk.org/jfx/pull/2198#issuecomment-4853015855

Reply via email to