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

Optimize Counter thread-to-stripe distribution #71

Merged
merged 1 commit into from
Oct 29, 2022
Merged

Conversation

puzpuzpuz
Copy link
Owner

@puzpuzpuz puzpuzpuz commented Oct 29, 2022

  • The number of stripes is now calculated dynamically based on the number of cores and GOMAXPROCS
  • The performance is close enough to the old one with 64 stripes while the memory footprint is significantly lower and, what's also important, unlucky distribution isn't a problem anymore

Note: this is a breaking change due to the new NewCounter method.

@puzpuzpuz puzpuzpuz added the enhancement New feature or request label Oct 29, 2022
@puzpuzpuz puzpuzpuz self-assigned this Oct 29, 2022
@codecov-commenter
Copy link

codecov-commenter commented Oct 29, 2022

Codecov Report

Base: 97.03% // Head: 96.35% // Decreases project coverage by -0.68% ⚠️

Coverage data is based on head (9d52599) compared to base (051117f).
Patch coverage: 91.17% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #71      +/-   ##
==========================================
- Coverage   97.03%   96.35%   -0.69%     
==========================================
  Files           6        6              
  Lines         912      932      +20     
==========================================
+ Hits          885      898      +13     
- Misses         22       27       +5     
- Partials        5        7       +2     
Impacted Files Coverage Δ
util.go 85.71% <81.25%> (-14.29%) ⬇️
counter.go 100.00% <100.00%> (ø)
rbmutex.go 87.17% <100.00%> (-7.70%) ⬇️
map.go 96.78% <0.00%> (-0.23%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@puzpuzpuz puzpuzpuz merged commit b1929a1 into main Oct 29, 2022
@puzpuzpuz puzpuzpuz deleted the optimize-counter branch October 29, 2022 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants