-
-
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
Make print_matrix O(1) again #23681
Make print_matrix O(1) again #23681
Conversation
Key benchmark: display(rand(1800000000)) |
I believe this commit introduced the performance regression: 0d688dd |
So I guess the extra credit here would be either a test that takes a short time when this is O(1) but effectively hangs when this is O(sum(size(A)). Or a benchmark in BaseBenchmarks. |
I think the benchmark is the best choice but I've never done that before, so I'll have to read up on BaseBenchmarks.jl. I managed to find a call that calls |
The vector and column matrix cases are faster and use less memory as expected. Now that |
Now that regression is gone. Just noise I guess? I feel like that shouldn't be an issue with BenchmarkTools but oh well. |
Any possibility of a backport? |
(cherry picked from commit c23d6bc)
Thanks @sbromberger for reporting this on Slack
Previously, printing an array
A
at the REPL would allocateO(sum(size(A)))
memory. This change was made to supportOffsetArrays
butOffsetArrays
appears to work with this new version too.