scheinerman / Permutations.jl

Permutations class for Julia.
Other
51 stars 14 forks source link

Allow a user to skip permutation validation #25

Closed LilithHafner closed 2 years ago

LilithHafner commented 2 years ago

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."