with adam's suggestions - lightning fast

1001 perms in ~1 minute