Post

Collecting is non-trivial because we have to go from a Vec<Sims> covering 8 chunks in parallel to a single linear vec. Some 8x8 u32 simd-matrix transpose from stack overflow did it nicely :) And then a neat linear dedup based on a version on @lemire.bsky.social's blog

0 reposts2 likes

But especially the canonical part is cool. This requires extra work: - a reverse-complement-invariant hash. So compute RC-nthash on the fly as well. - rightmost minimum in a window alongside leftmost - determining whether a kmer is canonical, based on #AC<>#GT. All that fits in 0.6ns, or 2 cycles 🤯