3 ms·
The benchmarks are from The Computer Language Benchmarks Game. I used to think this was a good way to compare programming language performance. But if you loo
by bvinc 10y ago
The benchmarks are from The Computer Language Benchmarks Game. I used to think this was a good way to compare programming language performance. But if you look into the results in detail, it's really not that simple.
If you look at rust vs C, you'll see many cases where rust is on par with C, or beats C.
When you start comparing WHY some rust version of a program is twice as slow as the C version, usually what you'll find is that someone has not spent the same amount of effort optimizing that program. Or in some cases, you'll see the C program using SIMD instructions, which you could do in rust, but it isn't stabilized yet.
What you won't find, is some intrinsic reason that the safety of rust is causing it to be slower than C. To just look at the benchmark totals and make that assumption would be wrong, and that's exactly what the author did.
- steveklabnik 10y agoAlso, that screenshot is from a long, long time ago.