Algorithm::NestedLoops is a more general effort, whereas Math::Combinatorics is focused specifically on generating combinations and permutations - I would expect it to derive some performance from that specialisation, especially in the case of combinations which are a bit more difficult to iterate with their need to treat e.g. aab and aba as duplicate.