I just wrote a small Rust program to solve an Euler Project problem. We are talking about 29 lines of code. On an Arch Linux system, using Rust 1.6, the compiled executable, compiled with
rustc -O --crate-type bin
The same program in C is 8.8 KB.
The C version runs in .155 seconds on a Thinkpad X-250. The Rust version is about 3x slower. Given the home-page marketing of “blazingly fast” and the chatter about a leaner runtime system, due to the lack of a GC, I’m more than a bit surprised that the executable is so large. It’s almost as big as the executable generated by Gambit Scheme to solve the same problem. The execution speed is also a concern. It doesn’t matter in this trivial case, but if that factor-of-3 were to apply to something substantial, it could be a show-stopper.