-
Notifications
You must be signed in to change notification settings - Fork 598
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ustring hash improvements #1
Conversation
Amending this review with an improved hash function that generates many fewer collisions. (See discussion on oiio-dev) |
…lacement of the tile & file mutexes to avoid false sharing (moving them from next to each other to next to the structures they protect).
I think I've made all the mods to address Chris' comments. |
…e expect m_validspec to be true, not at this point any more.
…cheFile refactor.
Sorry, I think I made the mistake of merging upstream fixes and that has muddied up the diffs here by incorporating those other committed changes. Chris, have I addressed your earlier comments? |
LGTM |
Wait a second ... I think I had made a comment which got lost ? Changing the hash to be size_t is bad as it changes the hash on 64 bit platforms. Its designed to be a 32 bit hash. |
Make the ustring statistics include info on hash collisions -- how many collisions (non-unique hashes), the max number of strings sharing a non-unique hash, and in debug mode the strings sharing the most-shared hash.
We think this is all harmless, but this stat allows us to reassure ourselves that hash collisions aren't hurting performance or becoming pathological.
Update: also replaced the hash function with one that has vastly fewer collisions.