Skip to content

Speed up reverse complement generation - #2

Open
v-reef wants to merge 1 commit into
wm75:mainfrom
v-reef:speed-up-reverse-complement
Open

Speed up reverse complement generation#2
v-reef wants to merge 1 commit into
wm75:mainfrom
v-reef:speed-up-reverse-complement

Conversation

@v-reef

@v-reef v-reef commented Jul 20, 2026

Copy link
Copy Markdown

This change makes VaporUp generate reverse-complement DNA sequences faster.

The old function used four separate replace operations. The new version uses one str.translate() table.

Tests still pass, and the benchmark improved from about 10.6 to 4.26 microseconds per call, around 2.5× faster.

@wm75

wm75 commented Jul 20, 2026

Copy link
Copy Markdown
Owner

Looks very good :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants