5 ms·
Rust's high-level I/O definitely needs some optimization work. For example, the APIs which allocate a String for each line tend to be limited to about 25MB/s on
by ekidd 12y ago
Rust's high-level I/O definitely needs some optimization work. For example, the APIs which allocate a String for each line tend to be limited to about 25MB/s on my laptop. But if I use the low-level fill_buf and write APIs, I can get about 500MB/sec throughput: http://codereview.stackexchange.com/a/73770/61214 http://codereview.stackexchange.com/a/73770/61214
There are even lower-level APIs which would probably go faster, but above a half-GB per second, I/O is no longer a bottle-neck for my code.
- cbriones 12y agoThe entire api for the IO module is actually being overhauled right now (see https://github.com/rust-lang/rfcs/blob/efb783a79c9987e678ed8e8e5ca9db0de70f512c/text/0517-io-os-reform.md https://github.com/rust-lang/rfcs/blob/efb783a79c9987e678ed8...). I'm sure this stabilization is priority for the team before actual optimizations can be done.