-
-
Notifications
You must be signed in to change notification settings - Fork 480
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
constructing matrices is very slow #18231
Comments
Author: Vincent Delecroix |
Commit: |
comment:1
I only did some cleanup in I did not solve the problem of the matrix space being rebuilt every time. New commits:
|
Branch: u/vdelecroix/18231 |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:3
Hello Vincent, In this branch you create functions, remove others, and change a lot of code. There is still a lot of guessing to do on the reviewer's part. It would be really cool if you could be more verbose about what you do. Really. I began to read the first commit, and I have several more specific questions:
Nathann |
This comment has been minimized.
This comment has been minimized.
comment:4
Hello Nathann, Thanks for having a look. Replying to @nathanncohen:
I made a big effort to separate the commit at least! It is now in the description of the ticket.
No choice. This is a cdef function defined in
All right. But then there is something wrong in the docstring of
All this was just old Cython code at the time Cython was not able to understand |
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:7
Yoooooo !
Thanks
Oh, okay!
Hmmmm.... Can you at least observe the difference? All that this
Okay! Nathann |
comment:8
Okay, I give up. Sorry, I just don't know these classes enough, I barely ever used them, I would do a terrible job as a reviewer. Nathann |
This comment has been minimized.
This comment has been minimized.
comment:10
needs rebase, does not apply |
Branch pushed to git repo; I updated commit sha1. This was a forced push. Last 10 new commits:
|
Dependencies: #18231 |
Branch pushed to git repo; I updated commit sha1. This was a forced push. Last 10 new commits:
|
comment:16
I moved the first commit to another ticket (#19026). |
comment:17
needs rebase |
This comment has been minimized.
This comment has been minimized.
Changed author from Vincent Delecroix to none |
comment:19
Outdated, this was fixed in #24742.
|
Changed dependencies from #19026 to none |
Changed branch from u/vdelecroix/18231 to none |
Changed commit from |
The problem is in the code which looks like the following
It causes the various matrix spaces to rebuilt almost each time! If we compare with
then we got
This is one of the reasons why the creation of Polyhedron is so slow (see #18213). (This has now improved since the creation of the ticket)
In the branch we:
matrix_generic_dense
andmatrix0
and do some optimization_get_matrix_class
inMatrixSpace
out of the class (as it depends only on the base ring and the sparseness)MatrixSpace
the argument__matrix_class
is now_matrix_class
. That way, it is possible in other part of Sage to optimize the creation of matrices by calling directlyMatrixSpace.matrix
and gain a significant speedup.follow up: #18258
CC: @nathanncohen
Component: linear algebra
Issue created by migration from https://trac.sagemath.org/ticket/18231
The text was updated successfully, but these errors were encountered: