-
-
Notifications
You must be signed in to change notification settings - Fork 401
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
add lazy_string in matrix2.pyx #35039
Conversation
@xcaruso it seems that this does not do the trick yet. See timings. |
Yes, I saw. |
That's a bit better now. Let's ask py-spy what's going on now. |
The value is taken from the cache now, so all the cost we are paying is the empty call to verbose at the top. |
So, that's a bit sad: @roed314 @videlec
|
Should we come up with a plan later today to add regression testing to SageMath so we have some chance to catch things like that in the future? @fchapoton @roed314 @videlec |
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.
looks good
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.
Looks good to me
馃摎 Description
Formatting verbose messages in the method right_kernel could be quite slow (even when the message is never printed). We use the functionality lazy_string in order to avoid the formatting.
Also, just calling
verbose()
is slow when just a cache lookup is needed.Timings
Before:
After:
馃摑 Checklist