Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I mean this is fine for an advertisement, but it woefully oversells clang if you're trying to meaningfully compare these things. A lot of what they're saying is misleading and or false.

In the early days, clang was significantly faster in compilation than GCC. They also barely implemented any code optimization. Now that clang generates code which is about 90% as fast, generally, as C++, its compilation speeds and memory usage have understandably bloated considerably.

Note that I say 90% as fast generally. It still hasn't caught up completely.

Clang pioneered LTO, but GCC does it better now.

Other people have mentioned gcc's previously terrible error message and inability to dumb ASTs.

I don't think this is up to HN standards.



> Clang pioneered LTO, but GCC does it better now.

Sorry, what? VC++ already had link-time code generation by 2005. (No clue exactly which year it was introduced though.)


The headline is clang vs. other open-source compilers, not sure if VC++ qualifies.


open64 had link-time optimization in the early 2000s. (although they called it IPA for interprocedural analysis).


It was first released in VC++ in 2002.

I don’t recall if HP actually shipped it, but I know they had a tech report or research paper around 1994 that did LTO.

I have a vague recollection that DEC may have shipped it in the 90s as well.


gcc error messages have improved massively since llvm came out.


I think it's great that gcc, Clang, and MSVC all push each other to improve their compile/link performance, code generation, error messaging, etc.


Which is why some people get a bit nervous when one tool (clang and the LLVM universe in general, curl, WebKit) becomes such a massive de facto standard it completely marginalizes competition. This is even true if something is Open Source: X11 edged out everything else in that general space (MGR, NeWS) to the point those two things I just mentioned are pretty well forgotten, and we don't know what we lost because of that.

It's possible some spaces can't have more than one player due to network effects (like network protocols, such as the Web); the history of the Internet looks like a Pod People or Borg plot where a more diverse ecosystem is consumed and replaced by a single all-consuming entity that gradually assimilates all distinct individuals. What we lost in diversity we gained in losing bizarre email gateways, I suppose. But languages are meant to be written to actual, real-world, written down standards, right? No possibility of friction when moving from one compiler to another, right?


Yes.

I don't believe clang is any better than GCC anymore. But other commenters have talked about it, and I don't want to be redundant.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: