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
Use echelonize instead of echelon_form in a few places #24122
Comments
Author: Travis Scrimshaw |
comment:1
Bad branch not based off |
Commit: |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:4
This last change nets me ~8% speedup:
versus
|
This comment has been minimized.
This comment has been minimized.
comment:5
Also versus
|
This comment has been minimized.
This comment has been minimized.
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:9
This is a bit weird
You are modifying
|
comment:10
Yes, it looks more simple, but it actually takes longer because it has to do the Ideally I would like to modify the data in place and just update the indices, but hash tables are not good for doing that. One of these days, someone (me) should implement another data structure for sparse matrices... |
Reviewer: Vincent Delecroix |
comment:11
Oh, I see. Note that for matrices over ZZ or QQ, there is a custom C datatype which is an array of sparse vectors. This is not ideal but already faster than dictionaries in most contexts. |
comment:13
Thanks for the review. |
Changed branch from public/linear_algebra/echelonize_in_invert-24122 to |
We do not need to create another copy of the augmented matrix to keep memory usage down (including putting it in a cache) and because it is faster.
We do this change in
__invert__
,right_kernel_matrix
, and_solve_right_nonsingular_square
.We also can take advantage of the sparse structure and our knowledge of the augmented matrix [I|A-1] when reconstructing the matrix.
Component: performance
Author: Travis Scrimshaw
Branch/Commit:
cfbb776
Reviewer: Vincent Delecroix
Issue created by migration from https://trac.sagemath.org/ticket/24122
The text was updated successfully, but these errors were encountered: