scheinerman / Permutations.jl

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

make `cycles` O(n) instead of O(n^2) and remove type instability #24

Closed LilithHafner closed 2 years ago

LilithHafner commented 2 years ago

Speeds up @elapsed cycles(Permutation(10^6)) from 6.56s to 0.169s on my computer.

codecov[bot] commented 2 years ago

Codecov Report

Merging #24 (0dc2d78) into master (07d959e) will increase coverage by 0.05%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master      #24      +/-   ##
==========================================
+ Coverage   81.17%   81.23%   +0.05%     
==========================================
  Files           4        4              
  Lines         356      357       +1     
==========================================
+ Hits          289      290       +1     
  Misses         67       67              
Impacted Files Coverage Δ
src/Permutations.jl 81.04% <100.00%> (+0.07%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 07d959e...0dc2d78. Read the comment docs.