High-level Languages and Speed
nitsudima writes to tell us Informit's David Chisnall takes a look at the 'myth' of high-level languages versus speed and why it might not be entirely accurate. From the article: "When C was created, it was very fast because it was almost trivial to turn C code into equivalent machine code. But this was only a short-term benefit; in the 30 years since C was created, processors have changed a lot. The task of mapping C code to a modern microprocessor has gradually become increasingly difficult. Since a lot of legacy C code is still around, however, a huge amount of research effort (and money) has been applied to the problem, so we still can get good performance from the language."
"Will we ever leave C behind? "
(clears throat) I was the second person to use gcc. Keep in mind though it didn't start as gcc: DECUS-C begat GCC and DECUS C became so when Dave Conroy donated the RSX-11M C compiler he wrote to DECUS. We couldn't get a UNIX licence and we had to use RSX. I worked with Dave at Teklogix in the late 70's and Vik Sondi and I were the only people besides Dave that used it while he was writing it. Back then PDP-11's were the entire universe and since of course dmr wrote C for the same machine it translated very very well. God I miss that instruction set, the last decent one ever made. But I digress.
We would compile a module then look over the assembly code. If we didn't like the code it produced (for the robotics crap we were doing) we'd change the source... or bug Dave.
C was meant to be a shorthand for Assembly. It really helps if you keep this in mind and write very simple C or know somewhat what the compiler it likely to spit out. Some of the C I've seen makes me fucking cringe frankly. Dan Benrstine gets it. Nicest C code I've ever seen. I'm digressing again, aren't I?
Yet, golly, there sure is a lot of C. Little things like all of unix and all the server software running this here intarweeb.
Nobody is more surprised that C is still going as strong as it is as dmr. He's happy.
Will C be around forever? Probably. RPG still is, and it's bloody useless. C may be replaced at some point when something better comes along. I don't expect to see this in my lifetime. And I'm only in my 40s (just).
Need Mercedes parts ?
You can't, you're not french and we've patented surrendering in the US!
"The way we can tell it's C# instead of Haskell is because it's nine lines instead of two." -- wadler