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
Performance problem in read_to_end was uncovered with PR #23668.
The reason is that in case of data to read equals vec's capacity, read_to_end anyway will reserve (and with #23668 will initialize) another 64KB in vec just to read nothing to it because of lack of any other way to get a EOF hint from Read implementor.
Performance problem in
read_to_end
was uncovered with PR #23668.The reason is that in case of data to read equals vec's capacity,
read_to_end
anyway will reserve (and with #23668 will initialize) another 64KB in vec just to read nothing to it because of lack of any other way to get a EOF hint fromRead
implementor.Simple illustration:
Result:
Edit:
Same with no initialization:
The text was updated successfully, but these errors were encountered: