-
Notifications
You must be signed in to change notification settings - Fork 355
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
perf: improves the performance of the Repr (Equiv.Perm α)
instance (2/4)
#20538
base: master
Are you sure you want to change the base?
Conversation
PR summary f7513f9d14Import changes for modified filesNo significant changes to the import graph Import changes for all files
Declarations diffNo declarations were harmed in the making of this PR! 🐙 You can run this locally as follows## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>
## more verbose report:
./scripts/declarations_diff.sh long <optional_commit> The doc-module for No changes to technical debt.You can run this locally as
|
This PR/issue depends on: |
@YaelDillies I wrote the comprehensible PR message. |
Can you provide some before/after comparison of timing? |
@YaelDillies Sorry for late, I've written the PR description in #12610. Even if we fix |
Okay great! maintainer merge |
🚀 Pull request has been placed on the maintainer queue by YaelDillies. |
The instance of
Repr (Equiv.Perm α)
uses the followingtruncCycleFactors
function:However, for a permutation consisted of many disjoint cycles, like
(c[0, 1] * c[2, 3] * c[4, 5] * c[6, 7] : Equiv.Perm (Fin 10))
, evaluating returned permutations takes too long.This is because the argument
f
incycleFactorsAux
gets more complex per step;f
to(cycleOf f x)⁻¹ * f
.To solve this problem, we memorize the first permutation:
Repr (Equiv.Perm α)
instance (1/4) #20519