debug mode performance patch

Paolo Carlini pcarlini@gmail.com
Thu Nov 18 23:54:00 GMT 2010


Hi,

> I thought about suggesting that too. François's improved get_mutex
> function only uses the lowest few bits, and I don't know how well
> Hash_bytes works if you don't use the whole value ... probably still
> better distributed than simply taking the address, and might avoid
> pathological cases where distinct pairs of objects always get the same
> two mutexes.

> 
If there aren't other issues, I think the new Murmur hash is pretty good even when only a limited range of values is eventually computed. Matt told me that if only we could use it uniformly over *all* the std::hash specializations he would even feel comfortable with simplifying the unordered containers to use a power of two number of buckets. Anyway, in case if need, in the .cc file we also have a reference to the main Google web page.

Paolo



More information about the Libstdc++ mailing list