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 size of BufferedWriteSyncer by moving stopped bool field #984

Merged
merged 1 commit into from Jul 30, 2021

Conversation

lancoLiu
Copy link
Contributor

No description provided.

@codecov
Copy link

codecov bot commented Jul 30, 2021

Codecov Report

Merging #984 (5d123f3) into master (81879d1) will decrease coverage by 0.09%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #984      +/-   ##
==========================================
- Coverage   98.20%   98.10%   -0.10%     
==========================================
  Files          46       46              
  Lines        2056     2056              
==========================================
- Hits         2019     2017       -2     
- Misses         29       30       +1     
- Partials        8        9       +1     
Impacted Files Coverage Δ
zapcore/buffered_write_syncer.go 100.00% <ø> (ø)
zapcore/sampler.go 96.22% <0.00%> (-3.78%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 81879d1...5d123f3. Read the comment docs.

@lancoLiu lancoLiu closed this Jul 30, 2021
@lancoLiu lancoLiu deleted the dev branch July 30, 2021 11:55
@lancoLiu lancoLiu restored the dev branch July 30, 2021 11:59
@lancoLiu lancoLiu reopened this Jul 30, 2021
@prashantv prashantv changed the title Byte alignment Optimize size of BufferedWriteSyncer by moving stopped bool field Jul 30, 2021
Copy link
Collaborator

@prashantv prashantv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keeping the 2 bool fields next to each other avoids wasting an additional word. Verified that the size of BufferedWriteSyncer drops from 104 bytes to 96 bytes with this change on amd64.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants