-
-
Notifications
You must be signed in to change notification settings - Fork 488
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
Implement actions using _act_ instead of _call_ #24500
Comments
This comment has been minimized.
This comment has been minimized.
Dependencies: #5574 |
Commit: |
Author: Jeroen Demeyer |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
comment:9
Do you have timings with this ticket (at least, my understanding of the description is the "after" does not include this ticket)? |
comment:10
Replying to @tscrim:
The "after" does include this ticket. |
This comment has been minimized.
This comment has been minimized.
comment:12
Replying to @jdemeyer:
Did you invert the “before” and “after” parts then? |
comment:13
Replying to @mezzarobba:
No, I did not... |
comment:14
On 8.2.beta4:
vs with #5574:
vs with #24500:
So I can explain why the first test is slower: there is an additional However, I did get an improvement when something was calling
vs with #24500
So my conclusion is this ticket does do a little bit of optimizing in certain cases and a regression in others. My current inclination is to give this ticket a positive review because it makes the action interface more clean by removing some of the implementation burden (i.e., deciding which input is which type). Do you agree with my assessment? Anyone else have any objections? |
Changed dependencies from #5574 to none |
comment:18
Many failing tests involving valuations... |
comment:24
Part of the slowdown in this ticket was caused by the second commit removing |
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. This was a forced push. New commits:
|
This comment has been minimized.
This comment has been minimized.
comment:28
LGTM. Sorry I let this ticket fall off my radar. |
Reviewer: Travis Scrimshaw |
Changed branch from u/jdemeyer/optimize_action___call__ to |
We change the internal API of
Action
: instead of the existing_call_
method, we implement an_act_
method which always takes(g, x)
as arguments, whereg
is the acting element andx
is the acted-on element.The current implementation using
_call_
takes a left and right argument. This is less efficient because many actions can be left or right actions. This means that every_call_
method needs to "decode" its arguments asg
andx
.Work on #24247 shows that a significant amount of time is spent in
Action.__call__
. This ticket optimizes that quite a bit. It also adds documentation toAction
.CC: @videlec @tscrim
Component: coercion
Author: Jeroen Demeyer
Branch/Commit:
3a0958d
Reviewer: Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/24500
The text was updated successfully, but these errors were encountered: