ArraysOfArrays.jl icon indicating copy to clipboard operation
ArraysOfArrays.jl copied to clipboard

sizehint! based on size of backing array

Open frankier opened this issue 2 years ago • 1 comments

It is sometimes that case I'm constructing a VectorOfArrays and I know what size the backing array will be as well as the number of arrays they will constitute. Would it be useful to add a:

function Base.sizehint!(A::VectorOfArrays{T,N}, n, s::Int) where {T,N}

Overload for this situation? Happy to put together a PR if there's agreement this is helpful.

frankier avatar Nov 16 '23 09:11 frankier

Sounds good - the question is, how do we express the size that we expect for the inner arrays in a way that fits the API of sizehint!?

oschulz avatar Nov 16 '23 13:11 oschulz