4 ms·
At this point, when I hear about "C-like performance", I already know somebody's trying to bullshit me.
by tdsamardzhiev 7y ago
At this point, when I hear about "C-like performance", I already know somebody's trying to bullshit me.
- simondanisch 7y agoIn the case for Julia it's true though, since It's compiled at runtime very similarly to C via LLVM. In all my years I've never seen any C/C++ code, where Julia couldn't match performance after some tweaking - often with much simpler code.
- pjmlp 7y agoYeah, because C compilers were always magically fast. /s C code generation only got where it is nowadays thanks to endless money spent in compiler optimization, taking advantage of UB beyond its original goal and compiler specific language extensions that probably will never be part of ISO C. Nothing that other compilers cannot get if there is willingness and enough money to throw at improving them. "Oh, it was quite a while ago. I kind of stopped when C came out. That was a big blow. We were making so much good progress on optimizations and transformations. We were getting rid of just one nice problem after another. When C came out, at one of the SIGPLAN compiler conferences, there was a debate between Steve Johnson from Bell Labs, who was supporting C, and one of our people, Bill Harrison, who was working on a project that I had at that time supporting automatic optimization...The nubbin of the debate was Steve's defense of not having to build optimizers anymore because the programmer would take care of it. That it was really a programmer's issue.... Seibel: Do you think C is a reasonable language if they had restricted its use to operating-system kernels? Allen: Oh, yeah. That would have been fine. And, in fact, you need to have something like that, something where experts can really fine-tune without big bottlenecks because those are key problems to solve. By 1960, we had a long list of amazing languages: Lisp, APL, Fortran, COBOL, Algol 60. These are higher-level than C. We have seriously regressed, since C developed. C has destroyed our ability to advance the state of the art in automatic optimization, automatic parallelization, automatic mapping of a high-level language to the machine. This is one of the reasons compilers are ... basically not taught much anymore in the colleges and universities." -- Fran Allen interview, Excerpted from: Peter Seibel. Coders at Work: Reflections on the Craft of Programming
- jstimpfle 7y ago> Nothing that other compilers cannot get if there is willingness and enough money to throw at improving them. Could you consider switching to another quote? I've read that one at least half a dozen times. I promise I will not annoy people here by picking one from the millions of quotes out there that report that C (or similar) is a good abstraction level to develop efficient and maintainable software. To put that quote in perspective anyway, the way I'm reading it isn't even that other (managed) languages can meaningfully rival C in its core strengths. It seems to be more about how interest in improving those managed languages faded (at that time) and the state of the art of compiling those languages regressed.. And regarding "endless money spent in C compiler optimization", neither is UB extremely interesting for optimization nor is optimization extremely interesting for already well-written programs. (I have only my own humble experience so can't really back this up. But question, when was the last time you got a 10x difference between -O0 and -O2?). (I've disagreed with quite a few of your comments recently. Just wanted to let you know that the last thing I did was upvote some of your comments ;-])
- pjmlp 7y agoNo, urban myths are hard to kill. Specially now that we at least two generations that believe that C was the genesis of system programming languages, fast like a thunderbolt since the first compiler got out of the furnace. I was already hitting on C during the USENET days, back on the glory days of C vs C++ on comp.lang.c, comp.lang.c++, and their moderated variants. My opinion does not change to win karma points.