-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
Added slow but thorough matrix benchmarks #65
Conversation
from sympy import I, S, simplify | ||
from sympy.simplify.simplify import simplify | ||
|
||
_TEST_SIMPLIFY = False # test simplify after operation? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the original benchmark since dotprodsimp was optional this was for comparing func(dotprodsimp=True)
vs. simplify(func())
. I left the code in just in case at some point someone wants to make the same comparison.
def time_A(self): A**4 | ||
def time_B(self): B**4 | ||
def time_C(self): C**4 | ||
def time_D(self): D**4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe could do
class _TimeMatrixBase:
def time_A(self): self.func(A)
def time_B(self): self.func(B)
def time_C(self): self.func(C)
def time_D(self): self.func(D)
class TimePow4(_TimeMatrixBase):
def func(self, M):
return M**4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably, but at this point with my potentially limited time I am focusing on the actual matrix code...
Note that we specifically want to avoid slow benchmarks. I suggest that benchmarks should be under a second here: #8 |
Are the benchmarks in the |
I see. I guess those are not run, see #35. |
These were requested to test the new matrix intermediate simplification in sympy PR #18572.