diff options
| author | Steven Fackler <sfackler@gmail.com> | 2015-03-28 18:47:29 -0700 |
|---|---|---|
| committer | Steven Fackler <sfackler@gmail.com> | 2015-03-28 22:32:08 -0700 |
| commit | ccb4e8423e50fef0f13a642715c3e617ee9f78fe (patch) | |
| tree | 41b8423da7c42def2bffba2fc14402d8f4df3afe /src/libstd/sys/unix/stack_overflow.rs | |
| parent | 3e7385aae9d58c8e12137d7c07aad48551048c13 (diff) | |
| download | rust-ccb4e8423e50fef0f13a642715c3e617ee9f78fe.tar.gz rust-ccb4e8423e50fef0f13a642715c3e617ee9f78fe.zip | |
Fix massive performance issue in read_to_end
with_end_to_cap is enormously expensive now that it's initializing memory since it involves 64k allocation + memset on every call. This is most noticable when calling read_to_end on very small readers, where the new version if **4 orders of magnitude** faster. BufReader also depended on with_end_to_cap so I've rewritten it in its original form. As a bonus, converted the buffered IO struct Debug impls to use the debug builders. Fixes #23815
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
