Useful when we know that a permutation is valid and performance is critical. This should not reduce safety unless a user explicitly passes verify=false.
For example, if DataFrames uses this to permute more efficiently, when there is only one column, calling cycles(Permutation(vector)) takes 64% of runtime, and 44% of that time is spent validating the input permutation, even though DataFrames's permute! advertises that "No checking is done to verify that p is a permutation."
Useful when we know that a permutation is valid and performance is critical. This should not reduce safety unless a user explicitly passes
verify=false
.For example, if DataFrames uses this to permute more efficiently, when there is only one column, calling
cycles(Permutation(vector))
takes 64% of runtime, and 44% of that time is spent validating the input permutation, even though DataFrames'spermute!
advertises that "No checking is done to verify thatp
is a permutation."