Did you like how we did? Rate your experience!

4.5

satisfied

46 votes

How low can Rust go in terms of latency?

Beat C or C++ (there is no such thing as C/C++)? Maybe. Maybe not. Thats going to be right down in the noise of compiler optimisations. Equal them? Probably. If you are allocating any memory at all in the fast path of anything realtime, youre doing it wrong. Once you take away the allocations, since Rusts memory safety system is done by compiler analysis, its a zero-cost abstraction, and you are then matching C++ smart pointers (std::unique_ptr, you shouldnt be using std::shared_ptr in a fast path either) or C with no safety assertions. Allocation should be done somewhere else out of the fast path. Rust might well make it a lot easier to write a correct parallel version of the fast path, and that might well buy you much more than memory safety. But I admit, I havent tried it.

100%
Loading, please wait...