in reply to Fastest way to do permutations with replacement
Algorithm::Loops is pure Perl (no XS) and thread-safe.