Given an integer count of tx hashes (set) and a proposed size of the duplicated hashes (width) the algorithm returns true if the set is mutable for the width. By enumerating all widths up to half the set size one determines all possible mutations. The sets of trailing txs that may make up a mutation can then be compared for duplication. On average that's an average of 1 comparison per block - at least for up to 44 txs (well below O(log(n))). By comparison Core's test is O(n) for any block.