Skip to content

perf: Replace BTreeSet with HashSet in apply_or_clauses for O(1) dedup - #144

Merged
adityamukho merged 1 commit into
mainfrom
perf/hashset-dedup-apply-or-clauses
Apr 17, 2026
Merged

adityamukho merged 1 commit into
mainfrom
perf/hashset-dedup-apply-or-clauses

Conversation

@adityamukho

Copy link
Copy Markdown
Collaborator

Summary

  • Replace BTreeSet with HashSet in both Or and OrJoin clause deduplication
  • HashSet provides O(1) average-case insertion/lookup vs BTreeSet's O(log n)
  • Removes redundant sort since HashSet uses equality not ordering

Fixes #139

@codecov

codecov Bot commented Apr 17, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.41%. Comparing base (5039c5c) to head (d113936).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #144      +/-   ##
==========================================
+ Coverage   83.35%   83.41%   +0.06%     
==========================================
  Files          26       26              
  Lines        4811     4811              
==========================================
+ Hits         4010     4013       +3     
+ Misses        801      798       -3     
Files with missing lines Coverage Δ
src/query/datalog/executor.rs 93.38% <100.00%> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@adityamukho
adityamukho merged commit b73faaf into main Apr 17, 2026
22 checks passed
@adityamukho
adityamukho deleted the perf/hashset-dedup-apply-or-clauses branch April 17, 2026 10:10
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.

perf: Replace sort-based dedup with HashSet in apply_or_clauses

1 participant