logoalt Hacker News

gf000yesterday at 3:43 PM2 repliesview on HN

> It's compilers and compiler optimizations that make code run fast

Well, then in many cases we are talking about LLVM vs LLVM.

> Ultimately, producing fast/optimal code in C kind of is the whole point of C

Mostly a nitpick, but I'm not convinced that's true. The performance queen has been traditionally C++. In C projects it's not rare to see very suboptimal design choices mandated by the language's very low expressivity (e.g. no multi-threading, sticking to an easier data structure, etc).


Replies

adgjlsfhk1yesterday at 10:47 PM

Compilers are only as good as the semantics you give them. C and C++ both have some pretty bad semantics in many places that heavily encourage inefficient coding patterns.

jillesvangurpyesterday at 4:18 PM

The compiler backend yes. But there probably is a lot of work happening elsewhere in the compiler tools.