Skip to content

Refactor SimHash banding logic into shared utility#44

Closed
saurabhsharma2u wants to merge 1 commit into
mainfrom
refactor/simhash-banding-utility-6286707582081801071
Closed

Refactor SimHash banding logic into shared utility#44
saurabhsharma2u wants to merge 1 commit into
mainfrom
refactor/simhash-banding-utility-6286707582081801071

Conversation

@saurabhsharma2u

Copy link
Copy Markdown
Contributor

Refactored the duplicated SimHash banding logic found in plugins/core/src/graph/cluster.ts and plugins/core/src/graph/duplicate.ts into a new static method SimHash.groupIntoBands in plugins/core/src/graph/simhash.ts. This improves code maintainability and reduces duplication. Confirmed that existing tests in clustering.test.ts and duplicate.test.ts pass.


PR created automatically by Jules for task 6286707582081801071 started by @saurabhsharma2u

- Added `SimHash.groupIntoBands` static method.
- Updated `cluster.ts` to use the new utility.
- Updated `duplicate.ts` to use the new utility.
@google-labs-jules

Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@saurabhsharma2u

Copy link
Copy Markdown
Contributor Author

Closing as this PR conflicts with the recent high-performance memory optimizations merged in PR 32. PR 32 rewrote to use flat Uint32Array/BigUint64Array typed arrays and index-based tracking, completely removing the Set<string> overhead. Introducing a generic groupIntoBands<T> that creates an array of Maps and Arrays of Objects would revert these critical performance wins. For cluster.ts, we might optimize it similarly in the future.

@saurabhsharma2u
saurabhsharma2u deleted the refactor/simhash-banding-utility-6286707582081801071 branch February 25, 2026 19:19
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.

1 participant