Skip to content

[codex] Optimize PyPropel hot paths - #5

Draft
Axfff wants to merge 5 commits into
2003100127:mainfrom
unibio-hkust-gz-sunnylab:codex/pypropel-performance
Draft

[codex] Optimize PyPropel hot paths#5
Axfff wants to merge 5 commits into
2003100127:mainfrom
unibio-hkust-gz-sunnylab:codex/pypropel-performance

Conversation

@Axfff

@Axfff Axfff commented Jun 19, 2026

Copy link
Copy Markdown

Summary

  • Vectorize MSA column/alignment frequency counting and MSA one-hot/frequency representations.
  • Reduce residue-distance atom-pair loop overhead with NumPy coordinate blocks while preserving existing output behavior.
  • Reduce repeated list concatenation in feature assembly paths.
  • Lazy-load public PyPropel wrapper modules so plotting dependencies are not imported on plain package import.
  • Add focused behavior tests and benchmark scripts for the optimized paths.

Validation

  • /Users/zhaoj/Project/TMInter/.venv/bin/python -m unittest discover -s tests
  • Performance worktree result: Ran 14 tests ... OK

Benchmarks

Representative local benchmark results from the TMInter environment:

  • Alignment columns: 0.300489s -> 0.018815s
  • Alignment whole frequency: 0.333040s -> 0.032574s
  • MSA one-hot: 0.565160s -> 0.001411s
  • MSA frequency matrix: 10.563461s -> 0.012403s
  • Distance one2one_all: 0.024435s -> 0.004458s
  • Feature assembly solvpred: 0.003100s -> 0.001815s
  • Feature assembly blast_: 0.041790s -> 0.009975s

Created as a draft for maintainer review.

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