optimization to reduce references to permutation table
Merge pull request #1 from khegeman/perm

optimization to reduce references to permutation table