Skip to content
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

Closed
wants to merge 9 commits into from

Conversation

lgritz
Copy link
Collaborator

@lgritz lgritz commented Feb 4, 2011

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.

@lgritz
Copy link
Collaborator Author

lgritz commented Feb 8, 2011

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).
@lgritz
Copy link
Collaborator Author

lgritz commented Feb 8, 2011

I think I've made all the mods to address Chris' comments.

@lgritz
Copy link
Collaborator Author

lgritz commented Feb 9, 2011

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?

@fpsunflower
Copy link
Contributor

LGTM

@fpsunflower
Copy link
Contributor

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.

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants