katerinakazantseva / strainy

Graph-based assembly phasing
Other
65 stars 5 forks source link

Might get some speed up using Pyston #50

Open jelber2 opened 1 year ago

jelber2 commented 1 year ago

You might be able to squeak out a little performance boost by adding - pyston_lite_autoload to environment.yml (using pyston 2.3.4 and python 3.8). Maybe give it a try for a larger file, but feel free to close and ignore. My change with pyston does not work on Mac M1 for me. I tested the below on a linux x86_64 system.

Using https://raw.githubusercontent.com/jelber2/stRainy/a3044ad744bb2b7aded527886420d2ab1e1568ca/environment.yml

./strainy.py phase  -o out_strainy -b test_set/toy.bam -g test_set/toy.gfa -t 4 -m hifi 
real    3m20.777s
user    7m47.106s
sys 0m54.875s

./strainy.py transform  -o out_strainy -b test_set/toy.bam -g test_set/toy.gfa -t 4 -m hifi 
real    2m57.932s
user    2m45.057s
sys 0m37.653s

Using https://raw.githubusercontent.com/katerinakazantseva/stRainy/39562cf13357b219664c4f4600abce08f4a623b9/environment.yml (python 3.10)

./strainy.py phase  -o out_strainy -b test_set/toy.bam -g test_set/toy.gfa -t 4 -m hifi 
real    3m23.230s
user    7m47.268s
sys 0m51.587s

./strainy.py transform  -o out_strainy -b test_set/toy.bam -g test_set/toy.gfa -t 4 -m hifi 
real    2m59.439s
user    2m45.938s
sys 0m38.145s