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
Cythonize matrix group elements #19870
Comments
comment:1
While this new structure has some near-duplication by not using the calls to New commits:
|
Commit: |
comment:2
many failing doctests, see patchbot |
comment:4
Fixed. |
comment:5
For
Hence it would be better to use On the other hand there exists
|
comment:7
At some point we do have to make a copy of the underlying matrix, and we can't modify |
comment:8
Why not
That would let the possibility for other rings/sparse matrices to implement an |
comment:9
The exception handling is slower when it has to occur: def foo(M):
try:
return M._invert_unit()
except AttributeError:
return ~M
def bar(M):
if M.base_ring() is ZZ and M.is_dense():
return M._invert_unit()
else:
return ~M
However, it is faster when no exception is generated:
Yet, I don't think that is enough of a speedup to justify the other cases (in particular, the |
comment:10
Actually, perhaps directly implementing a default |
comment:11
I like the idea of a
|
comment:12
I agree that |
comment:13
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:15
Replying to @jdemeyer:
All done. I also made |
Reviewer: Frédéric Chapoton |
comment:16
ok, good enough for me. And patchbots are green. In a later ticker, we should overload the is_one method. |
comment:17
Merge conflict, try the next beta... |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:19
Trivial rebase because git forgot that the file changed names (even though I had done it with |
comment:20
In the |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:22
Replying to @jdemeyer:
Done. |
comment:24
Thank you. |
Changed branch from public/groups/cythonize_matrix_group_element-19870 to |
They are used in a lot of places and should be cythonized. With my branch, I get ~10% speedup of my operations. Moreover, the class hierarchy for matrix group elements can and needs to be changed in order to do this. Specifically, I removed the
MatrixGroupElement_base
(theAffineGroupElement
overrode all but 1 method) andGroupElementMixinLibGAP
(only used byMatrixGroupElement_gap
).CC: @jdemeyer @vbraun
Component: cython
Keywords: matrix group, elements
Author: Travis Scrimshaw
Branch/Commit:
ddd203e
Reviewer: Frédéric Chapoton
Issue created by migration from https://trac.sagemath.org/ticket/19870
The text was updated successfully, but these errors were encountered: