The “C is Efficient” Language Fallacy

“[…] It’s a variation on the extremely common belief that C and C++ are the best languages to use when you need code to run fast. They’re not. They’re good at things that need to get very close to the hardware – not in the efficiency sense, but in the sense of needing to be able to fairly directly munge the stack, address specific hardware registers, etc. But they are dreadful languages for writing real scientific and/or numerical code. […]”

From: Good Math, Bad Math

In summary: C is for bit twiddling, OCaml kicks its ass for real numerical work, and all the scientists are still using Fortran where performance *really* matters, anyway.

Of course this is as of two years ago, I’d like to see how Haskell and compiled Erlang stack up now, and maybe Stalin (a Scheme -> C compiler). And while we’re at it, let’s be fair to C and try LLVM or Intel’s C compiler instead of GCC. Regardless though, all of his points seem to stand that there’s still loads of optimizations that simply cannot be done for C, which will always leave it behind as far as raw on the metal performance is concerned.


April 28, 2008 - Posted by | Programming

1 Comment »

  1. […] That seems to make enough sense to me. For one-off heavily numerical tests, Scheme pretty much sucks. Especially considering that to compile the code it often has to go through C. […]

    Pingback by How I feel about Scheme’s performance. « (hello | June 29, 2008 | Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: