Skip to main content

diff

Function diff 

Source
pub fn diff<F>(sets: &[&Set], limit: usize, f: F) -> usize
where F: FnMut(&[u8]),
Expand description

The members of the first set that no later set has.

The first set is the one being walked whether we like it or not, so the only choice is how each member is checked. Against a mixture that is a question per member, asked smallest set first because a member that is going to be found will usually be found there, and a member that is in the second set is never asked about the third. Against intsets it is a merge, and the order is the same either way because both walk the first set and the first set is ascending.

limit is SDIFFCARD’s, and is union’s in every respect.