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

fix: skip traversal of links with the same cid #76

Merged
merged 2 commits into from
May 11, 2023

Conversation

birdychang
Copy link
Contributor

Load tested with AMT that has 1M values and random 10 changes to mimic chain state changes.
Here's some stats:

  • bitwidth=3: 1075ms -> 0.7ms
  • bitwidth=4: 900ms -> 0.5ms
  • bitwidth=5: 757ms -> 1.5 ms
  • bitwidth=6: 638ms -> 0.6ms
  • bitwidth=7: 996ms -> 1ms

@codecov-commenter
Copy link

codecov-commenter commented May 11, 2023

Codecov Report

Merging #76 (ccfb697) into master (fab6283) will increase coverage by 0.05%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #76      +/-   ##
==========================================
+ Coverage   62.60%   62.65%   +0.05%     
==========================================
  Files           9        9              
  Lines        1345     1347       +2     
==========================================
+ Hits          842      844       +2     
  Misses        351      351              
  Partials      152      152              
Impacted Files Coverage Δ
diff_parallel.go 75.37% <100.00%> (+0.14%) ⬆️

@JesseXie JesseXie merged commit ecc4261 into filecoin-project:master May 11, 2023
9 checks passed
@birdychang birdychang deleted the fix-diff branch May 11, 2023 03:29
@@ -263,6 +263,9 @@ func diffNode(ctx context.Context, prevCtx, curCtx *nodeContext, prev, cur *node
}

// Both previous and current have links to diff
if prev.links[i].cid == cur.links[i].cid {
Copy link
Member

Choose a reason for hiding this comment

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

Similar to my comment in the HAMT change, use the Equals method.

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

4 participants