ksahlin / strobealign

Aligns short reads using dynamic seed size with strobemers
MIT License
128 stars 16 forks source link

Replace XXH64 with a simplified version #346

Closed marcelm closed 9 months ago

marcelm commented 9 months ago

This function gives the same result as regular XXH64(), but with the difference that it only works on single 64-bit values, which makes it possible to reduce it to just a couple of lines; mostly the "bit mixing" part (functions finalize()/avalanche()) is left.

This performs a little bit better than calling the original function on an 8-byte slice because the compiler (at least GCC) does not fully inline the original function (finalize() remains a function call).

This speeds up index generation by a couple of percent: 163 are reduced to 159 seconds for CHM13.

ksahlin commented 9 months ago

Approved.