3 ms·
> While Moore's law helps, languages are more expressive, safer, more performant and have more batteries included yielding a whole bunch of improvements. I hav
by SolarNet 10y ago
> While Moore's law helps, languages are more expressive, safer, more performant and have more batteries included yielding a whole bunch of improvements.
I have to disagree, compilers may have gotten a bit better at making faster binaries. But languages, like new languages, are increasing in expressiveness and safety, sure, but very rarely efficiency. Go and Rust are not faster than C or C++, likely never will be (for one C has decades of lead time), Go and Rust may be faster than C was 20 years ago, but that doesn't matter.
- steveklabnik 10y agoIf Rust is significantly slower than equivalent C or C++, it's a bug. Please file them. (And yes, sometimes, it's faster. Today. Not always! Usually they're the same speed.)
- SolarNet 10y agoMy point is more like this chart [0]. C has so much lead time, Rust will probably never be able to catch up, be close? Sure. But C has decades of lead time. [0] http://www.viva64.com/media/images/content/b/0324_Criticizing-Rust-Language-Why-Cpp-Will-Never-Die/image1.png http://www.viva64.com/media/images/content/b/0324_Criticizin...
- steveklabnik 10y agoThat chart is extremely old. We are sometimes faster than C in the benchmark games, with the exception of SIMD stuff due to it not being stable yet. (and, it can fluctuate, depending on the specific compiler version, of course.) For example, here's a screenshot I took a few months ago: http://imgur.com/a/Of6XF http://imgur.com/a/Of6XF or today: http://imgur.com/a/U4Xsi http://imgur.com/a/U4Xsi Here's the link for the actual programs: http://benchmarksgame.alioth.debian.org/u64q/rust.html http://benchmarksgame.alioth.debian.org/u64q/rust.html Today, we're faster in C than one program, very close in most, and behind where SIMD matters. > But C has decades of lead time. Remember, Rust uses LLVM as a backend, which it shares with Clang. So all that work that's gone into codegen for making C programs fast also applies to Rust, and all of the work Apple and whomever else is working to improve it further, Rust gets for free.
- SolarNet 10y agoI mean true, I'm playing devil's advocate here. I respect the Rust community (heck of all the nu-c languages I respect it the most, I even did a poster on 0.1 of it for my programming languages class), I will be quite impressed if they can pull off (and they are the most likely to be capable of it in my opinion) what so far has been an insurmountable task: beat an old guard language in general purpose performance (Fortran, C, etc.); languages that have every advantage but design foresight. If they do it, it will be a great historical case study on how to build a new programming language. As an aside: As someone who has used LLVM to build a compiler, it doesn't quite work that way, yes rust has access to those gains, but it may not be able to effectively use them (due to differing assumptions and strategies).
- steveklabnik 10y agoTotally hear what you're saying on all counts :)
- igouy 10y ago> My point is more like this chart < As steveklabnik noted that is old data (which you would be normally be able to see from the date-stamp in the bottom-right corner, but that's been hidden). This web page is updated several times a month, and presents the charts in context -- https://benchmarksgame.alioth.debian.org/u64q/which-programs-are-fastest.html https://benchmarksgame.alioth.debian.org/u64q/which-programs... (You might even think that you can tell which language implementations don't have programs written to use multi-core and which do.)