Conversation
migbro
reviewed
Feb 12, 2026
Member
migbro
left a comment
There was a problem hiding this comment.
This is pretty nice overall. I mostly just comments. I assume you've compared to the original implementation to ensure functional equivalence?
| return diff | ||
| return diff | ||
|
|
||
| def find_breakpoints(A, B, read, genome, chrom, asize, margin, maxdist): |
Contributor
Author
There was a problem hiding this comment.
Eh, I didn't write this. I just swapped out the mismatch function.
| spliced_mv = memoryview(spliced) | ||
| internal_mv = memoryview(internal_b) | ||
|
|
||
| # local copies to avoid global lookups in hot loop |
Member
There was a problem hiding this comment.
Interesting...is this for speed, or do global lookups have like "changed during iteration" problems?
Contributor
Author
There was a problem hiding this comment.
It is for speed. It's one of the many suggestions CHOPGPT came up with. The improvement was minimal compared to dropping numpy and doing early exit. Left it in anyway.
60476e0 to
8b72eaa
Compare
wongjessica93
approved these changes
Feb 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Speed improvement for find_circ. Original code can be found here: https://github.com/daaaaande/circs_snake/blob/master/scripts/pipelines/find_circ.py.
It's a 10 year old piece of software that is extremely slow. I decided to change a couple of things:
For this review, a lot of the code is copied from the original. For subworkflows/local/circs/bin/find_circ_mp.py everything can be taken as-is except for:
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Process time drops from 5.5 to 1.5 hours!
Test Configuration:
Checklist: