Tuplet filtering with less memory allocations