The “C Is Efficient” Language Fallacy (2006)
While I agree with the author about the main topic, the actual content does not illustrate the point well.<p>The author wrote a naive loop in a bunch of languages, and, got a faster result in OCaml (0.3 sec) than in C(0.8 sec). Right, but the code was a totally naive loop:<p>for (int i=0; i &lt; 20000) { for (int j=0; j &lt; 20000) { x[i][j] = y[i-2][j+1] * y[i+1][j-2]; } }<p>The fact that C has a bunch of libraries for vectorization of such code, or that there are million compiler directives that can speed that code a lot is somehow missing from the article.<p>So, the conclusion is that a compiled OCaml code is twice as fast as a naively written unoptimized loop in C.