Skip to content

Update BitSwap.java #5927

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

Closed
wants to merge 1 commit into from
Closed

Conversation

MahaleHarsh
Copy link

@MahaleHarsh MahaleHarsh commented Oct 21, 2024

removed the external getBit() method and replaced it with direct bitwise operations to check and swap bits more efficiently.

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized it.
  • All filenames are in PascalCase.
  • All functions and variable names follow Java naming conventions.
  • All new algorithms have a URL in their comments that points to Wikipedia or other similar explanations.
  • All new code is formatted with clang-format -i --style=file path/to/your/file.java

removed the external getBit() method and replaced it with direct bitwise operations to check and swap bits more efficiently.
@codecov-commenter
Copy link

codecov-commenter commented Oct 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 66.81%. Comparing base (e499d3b) to head (7aeb2df).
Report is 129 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #5927      +/-   ##
============================================
+ Coverage     66.80%   66.81%   +0.01%     
  Complexity     4501     4501              
============================================
  Files           611      611              
  Lines         16958    16958              
  Branches       3275     3275              
============================================
+ Hits          11328    11330       +2     
+ Misses         5182     5181       -1     
+ Partials        448      447       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@MahaleHarsh MahaleHarsh reopened this Oct 21, 2024
@MahaleHarsh
Copy link
Author

I hope my pull request will be accepted

@siriak
Copy link
Member

siriak commented Oct 23, 2024

The original version is much more readable in my opinion, so I wouldn't change it. We chose readability over performance here

@siriak siriak closed this Oct 23, 2024
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