-
-
Notifications
You must be signed in to change notification settings - Fork 487
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 constructor of Matrix_modn_dense_template #28432
Comments
Commit: |
Author: Clément Pernet |
New commits:
|
comment:3
one possibly related failure in src/sage/matrix/matrix_modn_dense_template.pxi, see patchbot report |
comment:4
Yes indeed, I'll look into it. |
comment:6
Ticket retargeted after milestone closed |
comment:7
Batch modifying tickets that will likely not be ready for 9.1, based on a review of the ticket title, branch/review status, and last modification date. |
comment:9
Setting new milestone based on a cursory review of ticket status, priority, and last modification date. |
comment:10
Setting a new milestone for this ticket based on a cursory review. |
Adding @marizee in the loop since this seems related to matrix creation issues we would like to fix. |
The issue still stands, we can observe that matrix creation seems slow, which is confirmed when we compare it to the RREF method, or when we compare it to other contexts such as matrices over the rationals or over Here are some tests :
The zero matrix is cached, so subsequent calls are much faster, and one can use
But still, this looks like a very long time for creating the zero matrix. Furthermore, the cached zero matrix is not exploited for example in such calls :
To observe that this is too long, consider the following case :
Here creating the zero matrix is much faster than computing the reduced row For other types such as rationals or matrices over GF(2), creation of the zero
|
Indeed, seeing that for example creating a matrix over the rationals is much faster (by a factor of 20 !), this issue still stands, and must be considered. I'm not sure that the problem is still that the entries are reduced mod p upon creation, as it was observed when this issue was created back in 2019; this must be investigated further.
I suppose you meant "is not much faster". Yes, this is an interesting comparison, |
When a new matrix mod p with less than 23 bits is constructed, without specifying the intializing value, the constructor still scans the m x n coefficients (all equal to 0) and reduce them mod p.
This eats up a significant portion of the time taken to compute basic operations such as matrix products.
Component: linear algebra
Author: Clément Pernet
Branch/Commit: u/cpernet/speed_up_constructor_of_matrix_modn_dense_template @
53d0597
Issue created by migration from https://trac.sagemath.org/ticket/28432
The text was updated successfully, but these errors were encountered: