3 ms·
This is not really a good comparison: the author acknowledges that the C and Rust programs are using different data structures, and while he tries to vary the p
by quotemstr 8y ago
This is not really a good comparison: the author acknowledges that the C and Rust programs are using different data structures, and while he tries to vary the problem a bit to explore that difference, it's still not a fairly matched comparison, and the headline leaves the reader with the incorrect impression that we're comparing similar things.
I'm not sure that comparing "Rust" and "C" performance is even meaningful. The latter is a multi-implementation language, and in most implementations, can be written in a way that gets the compiler to generate the same machine code that the Rust compiler does. (Frequently, they both just go through LLVM.)
- p0nce 8y agoAnd in this particular benchmark, they didn't choose the same compiler backend too. Namely GCC -O2 vs LLVM -O3. This has a large impact, often larger than the frontend language, when measuring programs in native languages.
- kiriakasis 8y agoThe fact that the two benchmarks are using different data structure is one of the main points of the a article. The author (in my opinion) argues that each data structure would be an hell to use in the other language. when comparing languages you need to include a measure of how idiomatic your programs are.