-
-
Notifications
You must be signed in to change notification settings - Fork 599
handle permutations in S_n with n > 2^16 #39999
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
base: develop
Are you sure you want to change the base?
Conversation
Documentation preview for this PR (built with commit c5eab93; changes) is ready! 🎉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess the failing tests have nothing to do with these changes. If so, feel free to set this to positive review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM except I have one question: did you look at the memory usage of your doctest? Does it require a lot of memory?
In theory it just needs to allocate an array 2**17 of
via:
vs
|
should this extreme high RAM test be marked as |
I added and tried to make the example less memory intensive, but didn't succeed on that front: sage: from resource import *
sage: print(getrusage(RUSAGE_SELF)[2]/1024.**2)
220.046875000000
sage: SymmetricGroup(2**16+1)((2**16,2**16+1))._libgap_()
(65536,65537)
sage: print(getrusage(RUSAGE_SELF)[2]/1024.**2)
319.703125000000 |
can't you make sparse permutations in GAP? (probably not, as I vaguely recall). If not, then any test is bound to be RAM-expensive. |
There are small and large permutations, both stored in the one line representation, see |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
Thank you |
This resolves #39998, as the issue is gap having small and large permutations:
https://github.com/gap-system/gap/blob/f0b438db8fa5786d19975e6040076fd46b08bd85/src/permutat.h#L18-L26
📝 Checklist