Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

As I said earlier on the mailing list, I suspect (without looking into it) that the cause of the I/O performance slowdown relative to C++ is something related to buffering—perhaps the I/O is not being buffered, or the buffer isn't functioning right. This would be consistent with the serialization-based I/O leading to larger slowdowns, because there would be more calls to write(2) then. If so, then this should be fixable.

I'm pleasantly surprised to see the object mode slightly faster than C++.



I should note that the Rust version currently omits some features of the C++ version, such as read-limiting and the actual counting of the throughput. These things are cheap, but they may explain why Rust is faster in that one case.


We did some benchmarking on IRC today in light of this post and we found that Rust's stdio is currently quite slow due to a flag not being set properly in libuv which causes it to punt to a thread pool. There is currently a fix in the queue: https://github.com/mozilla/rust/pull/10558


In case you get some time would appreciate a blog post or a comment describing what the issue was on the rust side as well as on the libuv side. Upvoted in advance.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: