-
Notifications
You must be signed in to change notification settings - Fork 5
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
resize! of HybridArray #64
Comments
Currently there is no such functionality but I can add it for https://github.com/JuliaArrays/ElasticArrays.jl wrapped in |
I didn't know ElasticArrays but it sounds interesting! However, I understand my problem better now and solved it differently. My first attempt to increase the Array was generate a new one and copy the data resulting in bad performance (example with short arrays):
But when I insted loop over the third dimension, I get good performance:
I guess So from my side this issue can actually be closed. |
Hm, that broadcast shouldn't be so slow but I'm not sure what causes that issue. I'll have to investigate. |
I improved the benchmark a little with:
The difference is smaller but still signifficant.
tells me that most time is spend in |
I've spent some time investigating but I got stuck: https://discourse.julialang.org/t/tracking-the-cause-of-allocation-in-the-presence-of-a-generated-function/98215 . I have no idea why Julia failed to optimize that call and the tools I know don't help 😕 . I think it would be easier to implement |
Ok, thanks for looking into this! |
I use HybridArrays as a replacement for a Vector of SMatrices. Now I found the need to
resize!
the Vector.This works for Vector of SMatrices but not a HybridArray:
Is there a way to achieve this with a HybridArray?
The text was updated successfully, but these errors were encountered: