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

Add hit/miss counting, but not mutex for thread safety. #3

Merged
merged 2 commits into from
Dec 5, 2018

Conversation

jameinel
Copy link
Member

@jameinel jameinel commented Dec 5, 2018

I looked into adding a mutex around Intern() but it seemed to cost about 10% CPU performance. It was a little hard to tell as the benchmark values weren't 100% stable.

Regardless this should address feedback from the previous PR and then add hit/miss counters. I added the counters because you can't see it from the outside, while you can always just wrap the call in a mutex.

@jameinel
Copy link
Member Author

jameinel commented Dec 5, 2018

$$merge$$

@jujubot jujubot merged commit 305dec0 into juju:master Dec 5, 2018
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.

3 participants