
El 01/10/2025 a las 11:09, Arnaud Becheler escribió:
Congratulations ! That was a much awaited feature if I remember well ! Was it tricky to implement?
Well, trickier than I thought at first. The most challenging part was to achieve a speedup for filter<T,K,...> lokup when K>1: as it happens, regular lookup in this case is branchful, meaning it stops checking bits as soon as one comes up negative, and streamlining a bunch of N early-exit operations while keeping a perf edge is not immediately obvious (a naive implementation would end up doing N*K checks vs. N*(expected number of bits till first negative) ~ N*(size of the array/number of 1s in the array)). I think I should write a blog article to explain this in more detail :-) Joaquín M López Muñoz