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

[#729] improvement: use foreach when iterate Roaring64NavigableMap for better performance #730

Merged
merged 1 commit into from
Mar 17, 2023

Conversation

zuston
Copy link
Member

@zuston zuston commented Mar 16, 2023

What changes were proposed in this pull request?

use foreach when iterate over Roaring64NavigableMap for better performance

Why are the changes needed?

From the doc of RoaringBitmap/RoaringBitmap#44, it will reduce gc footprint and be faster when using the foreach

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Don't need.

@zuston zuston changed the title [#729] improvement: use foreach when iterate over Roaring64NavigableMap for better performance [#729] improvement: use foreach when iterate Roaring64NavigableMap for better performance Mar 16, 2023
@codecov-commenter
Copy link

codecov-commenter commented Mar 16, 2023

Codecov Report

Merging #730 (8b894a2) into master (a1c2462) will increase coverage by 2.15%.
The diff coverage is 75.00%.

@@             Coverage Diff              @@
##             master     #730      +/-   ##
============================================
+ Coverage     60.73%   62.89%   +2.15%     
+ Complexity     1859     1858       -1     
============================================
  Files           231      217      -14     
  Lines         12861    10893    -1968     
  Branches       1073     1071       -2     
============================================
- Hits           7811     6851     -960     
+ Misses         4635     3686     -949     
+ Partials        415      356      -59     
Impacted Files Coverage Δ
...ffle/common/segment/LocalOrderSegmentSplitter.java 82.25% <0.00%> (+2.57%) ⬆️
.../org/apache/uniffle/server/ShuffleTaskManager.java 76.62% <100.00%> (-0.14%) ⬇️

... and 15 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@zuston zuston requested review from jerqi and advancedxy March 16, 2023 07:58
@zuston
Copy link
Member Author

zuston commented Mar 17, 2023

cc @kaijchen

@advancedxy
Copy link
Contributor

The code itself looks good to me.

Do you have any numbers or noticed this inefficiency in profiling .

Copy link
Contributor

@kaijchen kaijchen left a comment

Choose a reason for hiding this comment

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

LGTM, it also makes the code easier to read.

@zuston
Copy link
Member Author

zuston commented Mar 17, 2023

Do you have any numbers or noticed this inefficiency in profiling .

No, I just construct the data into bitmap and found that the foreach is 2x faster than iterator

@zuston zuston merged commit d82e10d into apache:master Mar 17, 2023
advancedxy pushed a commit to advancedxy/incubator-uniffle that referenced this pull request Mar 21, 2023
…vigableMap for better performance (apache#730)

### What changes were proposed in this pull request?

use foreach when iterate over Roaring64NavigableMap for better performance

### Why are the changes needed?

From the doc of RoaringBitmap/RoaringBitmap#44, it will reduce GC footprint and be faster when using the `foreach`

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

Don't need.
xianjingfeng pushed a commit to xianjingfeng/incubator-uniffle that referenced this pull request Apr 5, 2023
…vigableMap for better performance (apache#730)

### What changes were proposed in this pull request?

use foreach when iterate over Roaring64NavigableMap for better performance

### Why are the changes needed?

From the doc of RoaringBitmap/RoaringBitmap#44, it will reduce GC footprint and be faster when using the `foreach`

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

Don't need.
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.

4 participants