Repository navigation
refactor(umi): use binary search for count_index and deduplicate MoleculeId formatting - #146
Conversation
…culeId formatting Replace linear scan of count_index in build_adjacency_graph with partition_point binary search, reducing per-node lookup from O(n) to O(log n) in the BFS inner loop. Simplify MoleculeId::to_string_with_offset to delegate to write_with_offset, removing duplicated format logic across three methods.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe changes optimize and refactor two modules in the fgumi-umi crate. In 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #146 +/- ##
=======================================
Coverage 83.61% 83.61%
=======================================
Files 126 126
Lines 51510 51510
=======================================
Hits 43069 43069
Misses 8441 8441 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
Summary
.find()scan oncount_indexwith O(log n)partition_pointbinary search in bothbuild_adjacency_graph_bitencandbuild_adjacency_graph— the array is sorted descending by count, making binary search straightforwardMoleculeId::to_string_with_offsetto delegate towrite_with_offset, removing duplicated format logicTest plan
cargo nextest run -p fgumi-umi— all tests passcargo ci-fmt— cleancargo ci-lint— clean