-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Fix #19503 (provide a unary minus method specialized for sparse matrices) #19530
Conversation
Is there any way to test that we don't accidentally delete this again in the future? |
I was wondering the same. In an earlier PR I somehow checked calling of a specialized method, but I haven't been able to figure out which PR that was. Will spend a bit more time looking. Thanks for reviewing! Edit: Found it, #16979. Update inbound. |
Now with a test. Thanks! |
Could also add something to BaseBenchmarks.jl? |
Could, but not certain that's worthwhile? The test included in this PR should prevent regressions, and a benchmark of the one-liner in this PR distills to a benchmark of |
always worth adding more benchmarks |
Cheers, I can prepare a BaseBenchmarks PR at some point if you feel this is worth benchmarking. Question though:
Does that statement not fail at some point? Consider this illustrative hyperbole: Would a benchmark equivalent to |
If it's completely redundant with existing benchmarks then it's probably not worth adding. But I don't think this is, since the tests and dispatch here can change over time and independently tracking the performance of the end-user operation that was reported here is worthwhile. |
Cheers, I appreciate the explanation! |
Suggested benchmark submitted: JuliaCI/BaseBenchmarks.jl#45. Thanks! |
Thanks for reviewing / merging! |
As @StephenVavasis caught in #19503 (thanks!), I accidentally removed the unary minus method specialized for sparse matrices in #17265. This pull request provides a replacement method. Fixes #19503. Best!