You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
merge currently allocates more than it should on next calls, by creating new arrays with no pre-reserved capacity. What’s more, in its current form of allowing max 3 streams to be merged, this array could actually just be a tuple and avoid the allocation altogether.
There are comments throughout the implementation that suggest the idea was to eventually use variadic generics to merge N streams. We should decide if this is something we actually want to do, and either reserve enough capacity in the continuations array to avoid the constant resizing, or stick to a tuple if we won’t allow more than 3 (or some other fixed number of) streams.
The text was updated successfully, but these errors were encountered:
merge
currently allocates more than it should onnext
calls, by creating new arrays with no pre-reserved capacity. What’s more, in its current form of allowing max 3 streams to be merged, this array could actually just be a tuple and avoid the allocation altogether.There are comments throughout the implementation that suggest the idea was to eventually use variadic generics to merge N streams. We should decide if this is something we actually want to do, and either reserve enough capacity in the
continuations
array to avoid the constant resizing, or stick to a tuple if we won’t allow more than 3 (or some other fixed number of) streams.The text was updated successfully, but these errors were encountered: