Skip to content
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

Speed up AlgebraicExtension and AlgebraicExtensionNC for larger degrees #4622

Merged

Conversation

frankluebeck
Copy link
Member

When creating an algebraic extension K[X]/(f(X)), say of degree n,
then GAP precomputes the reduced representatives of X^i, n <= i <= 2n-2,
modulo f(X). With this patch this is done in n-2 row operations instead
of (n-1)*(n-2)/2. This yields a significant speedup already for moderate
degrees.

Text for release notes

'AlgebraicExtension(NC)' is now faster for larger degrees.

When creating an algebraic extension K[X]/(f(X)), say of degree n,
then GAP precomputes the reduced representatives of X^i, n <= i <= 2n-2,
modulo f(X). With this patch this is done in n-2 row operations instead
of (n-1)*(n-2)/2. This yields a significant speedup already for moderate
degrees.
@frankluebeck frankluebeck added backport-to-4.11-DONE topic: library topic: performance bugs or enhancements related to performance (improvements or regressions) and removed backport-to-4.11-DONE labels Jul 27, 2021
@frankluebeck frankluebeck requested a review from hulpke July 27, 2021 22:38
Copy link
Contributor

@hulpke hulpke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes complete sense. Thank you!

Copy link
Member

@fingolfin fingolfin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, this looks very nice.

Would it be possible to add a test for this code, even a very simple one? As it is, the code is not at all exercised by our test suite

@fingolfin fingolfin merged commit 1f0b77a into gap-system:master Jul 30, 2021
@fingolfin fingolfin changed the title Speedup precomputation in AlgebraicExtension Speed up AlgebraicExtension and AlgebraicExtensionNC for larger degrees Aug 17, 2022
@fingolfin fingolfin added the release notes: use title For PRs: the title of this PR is suitable for direct use in the release notes label Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release notes: use title For PRs: the title of this PR is suitable for direct use in the release notes topic: library topic: performance bugs or enhancements related to performance (improvements or regressions)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants