marcelm / dnaio

Efficiently read and write sequencing data from Python
https://dnaio.readthedocs.io/
MIT License
61 stars 9 forks source link

Use dispatch rather than rely on separate compile commands for SSSE3 bam parser #131

Closed rhpvorderman closed 7 months ago

rhpvorderman commented 8 months ago

See: https://github.com/samtools/htslib/pull/1764

Using dispatch is less flaky than precompiling with SSSE3 instructions. It will work on any machine.

I made the dispatching work properly with GCC. I also used the basic nibble2base function in htslib as a base for the default.

From prior discussion in htslib I learned that deoding the qualities can be easily optimized by the compiler including the tricks to do so.

rhpvorderman commented 7 months ago

@marcelm Friendly reminder ping. This will make the build arguments easier so it has my preference over the current solution of always compiling on with -mssse3 on linux.

rhpvorderman commented 7 months ago

Thanks for the review. It is done. Also I found some issues when compiling on ARM64 when this code was incorporated into sequali. I have updated the macros such that they will work now on ARM64 as well.

I am not very fond of all this compiler checking macors, but I see no better way alas.