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
Pre-allocate in Read::read_to_end and read_to_string based on size_snapshot
In the case of reading a normal file, this creates a buffer of the desired
size up front so it avoids over-allocation and re-allocation.
It adds an fstat syscall, but in the case of reading a normal file, this
eliminates the final 0-byte read syscall at the end.
This also changes the default read size pattern from 32,64,128,256,... to
32,32,64,128,... so that default allocation sizes and file reads are aligned
at power-of-two boundaries.
0 commit comments