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

bit_array: Simplify subtraction #2533

Merged
merged 2 commits into from Oct 3, 2018
Merged

bit_array: Simplify subtraction #2533

merged 2 commits into from Oct 3, 2018

Conversation

ValarDragon
Copy link
Contributor

@ValarDragon ValarDragon commented Oct 2, 2018

This significantly simplifies subtraction logic. I suspect it also significantly speeds it up due to defer removal.

  • Updated all relevant documentation in docs - n/a
  • Updated all code comments where relevant
  • Wrote tests
  • Updated CHANGELOG_PENDING.md - seems like a fairly internal change

@ValarDragon
Copy link
Contributor Author

ValarDragon commented Oct 2, 2018

I've been doing too much algebra over finite field extensions lol. I got the carry-less subtraction confused with over there where it is an xor. It should actually be an and not. Changed that in the latest commit, tests should now pass.

@codecov-io
Copy link

codecov-io commented Oct 2, 2018

Codecov Report

Merging #2533 into develop will decrease coverage by 0.08%.
The diff coverage is 100%.

@@             Coverage Diff             @@
##           develop    #2533      +/-   ##
===========================================
- Coverage    61.36%   61.27%   -0.09%     
===========================================
  Files          202      202              
  Lines        16731    16681      -50     
===========================================
- Hits         10267    10222      -45     
+ Misses        5598     5592       -6     
- Partials       866      867       +1
Impacted Files Coverage Δ
libs/common/bit_array.go 76.62% <100%> (-2.88%) ⬇️
libs/common/math.go 31.25% <0%> (-12.5%) ⬇️
libs/db/remotedb/remotedb.go 36.84% <0%> (-4.69%) ⬇️
libs/autofile/autofile.go 75% <0%> (-2.64%) ⬇️
consensus/reactor.go 72.6% <0%> (-0.65%) ⬇️
consensus/state.go 77.3% <0%> (-0.24%) ⬇️

Copy link
Contributor

@melekes melekes left a comment

Choose a reason for hiding this comment

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

🍰 🌮 🍉

Great work!

@melekes melekes merged commit cb2e584 into develop Oct 3, 2018
@melekes melekes deleted the dev/bitarray_sub branch October 3, 2018 07:29
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.

None yet

3 participants