Opened 2 years ago
Closed 2 years ago
#26775 closed enhancement (invalid)
Speed up actions in coercion model
Reported by: | jdemeyer | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-duplicate/invalid/wontfix |
Component: | coercion | Keywords: | |
Cc: | tscrim | Merged in: | |
Authors: | Jeroen Demeyer | Reviewers: | |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | #24500 | Stopgaps: |
Description (last modified by )
This is the logic that the coercion model uses when it calls an action:
- Get the action object (an
Action
instance) given the parents of both arguments and the operation. This is cached usingTripleDict
, so lookup of known actions is fast.
- Call the action using the generic
__call__
interface.
- The action checks again the parents of the arguments.
- The actual action method
_act_
is called.
Step 3 takes a non-trivial amount of time and is completely unneeded since the coercion model already knows that the parents are correct.
We also remove the (op is not sub) and (op is not isub)
checks: I see no reason why actions should not be allowed for subtraction.
Change History (2)
comment:1 Changed 2 years ago by
- Description modified (diff)
comment:2 Changed 2 years ago by
- Milestone changed from sage-8.5 to sage-duplicate/invalid/wontfix
- Resolution set to invalid
- Status changed from new to closed
Note: See
TracTickets for help on using
tickets.
Never mind, the description is wrong.