-
Notifications
You must be signed in to change notification settings - Fork 17
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
[WIP] better performance in collect_similar
#200
base: main
Are you sure you want to change the base?
Conversation
# If the array is chunked, read each chunk and apply the function | ||
# via broadcasting. | ||
if DiskArrays.haschunks(input) isa DiskArrays.Chunked | ||
# TODO: change this if DiskArrays ever supports uneven chunks |
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.
It does already, but what would need to change?
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.
This comment can be disregarded I think, at least for now. I need more testing to determine the best approach here.
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.
For some more context, the approach I had in an earlier iteration of this was that I pre-allocated a single array that would hold the contents read by the diskarray. Then you could readblock!
directly into that array allowing us to get away with minimal allocations.
However, this approach seemed to be slower than even the current approach, not sure why.
Currently this has a runtime of ~80 microseconds on my test case. Built on top of #198. Feel free to ignore the first two commits.