-
-
Notifications
You must be signed in to change notification settings - Fork 652
Actually avoid hermite_form in solve_right if possible #40497
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
Actually avoid hermite_form in solve_right if possible #40497
Conversation
@@ -901,7 +901,6 @@ cdef class Matrix(Matrix1): | |||
sage: v = matrix.identity(QQ, 500).solve_right(vector(QQ, [1]*500), extend=False) # <1s | |||
sage: matrix.identity(QQ, 500).hermite_form() # not tested (slow) | |||
sage: v = (matrix.identity(ZZ, 500)*2).solve_right(vector(ZZ, [2]*500), extend=False) # <1s | |||
sage: matrix.identity(ZZ, 500).hermite_form() # not tested (slow) |
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.
This line was deleted because (surprisingly) it's actually fast. Only hermite_form of 2 × Id or something similar is slow.
Before:
After:
Is the merge-fixes commit intentional? Otherwise LGTM, thanks. |
727b7a0
to
7715d90
Compare
Indeed that's different issue, I moved that one to #40502 . (the rationale is explained there.) |
I'm fine with it as-is, but if the goal of these tests is to ensure that
You could then cut down the size of the examples from 500 to, say, 10. Which won't make a huge difference in speed but we'll actually be testing the thing we want to test. |
the goal is to make sure they're fast. the fact that it is implemented by avoiding computing the Hermite form of the matrix is only a implementation detail. |
I tried to speed this up in #40276 , but there was some error in logic which makes it fail.
📝 Checklist
⌛ Dependencies