Ragnar {Groot Koerkamp} 🦋
1.8K posts

Ragnar {Groot Koerkamp} 🦋
@curious_coding
PhD on high troughput bioinformatics @ ETH Zurich; IMO, ICPC, Xoogler, Rust, road-cycling, hiking, wild camping, photography https://t.co/wBv2zN4F80





One of my favourite tricks of CS algorithms Theory vs Practice is binary search optimisation for cache-friendliness. The standard algorithm looks at the middle of array and jumps back and forth. This destroys cache. Instead, store a pre-order traversal of a sorted array represented as a tree. This way you always hit the first elements of the array, and they can be safely cached.




Barbell Resolves Demultiplexing and Trimming Issues in Nanopore Data biorxiv.org/content/10.110… #biorxiv_bioinfo



I was curious whether compilers would convert a naive loop implementation of "set range of bits in u64 to 1" into O(1) bitwise ops. Answer: MSVC compiles the loop into a loop. Clang's output is bonkers: 418 bytes long, branches everywhere, 256-bit SIMD operations get involved?!









