Wherever possible just forward `readblock!`
Opened this issue · 2 comments
It seems in a lot of cases we call getindex
on the parent objects rather than just jumping straight to readblock
. If for example we know the type doesn't change we don't always need to allocate another output buffer.
Calling readblock!
rather than getindex
also has a much lower compilation overhead.
I think we need to define generic readblock
on AbstractArray` for this to work generally, it broke a lot of things when I tried it locally.
@meggart what do you think of this as general change in approach?
I was thinking when the type doesn't change we can just use the same allocated memory and skip around all of the getindex
machinery completely for the inner arrays, which will make compilation of nested DiskArray broadcasts a lot faster and also reduce runtime allocations.