7 ms·
More performant I am not sure. Would have to see specific benchmarks comparing and the assembly for the newest gcc and newest clang. The reaosn why I vastly pr
by hak8or 8y ago
More performant I am not sure. Would have to see specific benchmarks comparing and the assembly for the newest gcc and newest clang.
The reaosn why I vastly prefer clang is for three main reasons.
Firstly, clang and llvm are written in c++ so it's much easier for me to work with. Secondly, it has proper documentation on how to, for example, add new optimization passes or adding a new instruction. This includes tons of talks and presentations on doing this live. Thirdly, the tooling for it is great, such as clangd, llc, lld, clanggtidy, etc.
Gcc seems to have none of this. Oh, and almost forgot, most importantly llvm + clang is actually open source (more open) via a MIT license instead of gpl.
- fs111 8y ago> Firstly, clang and llvm are written in c++ so it's much easier for me to work with. Why is the implementation language important to you as a user?
- endorphone 8y agoTheir interest seems to be primarily in alter the toolchain itself. To make this a multi-use comment, I'll also reply to GP and say that in every single case where I've benchmarked time sensitive code, GCC has generated faster, tighter code. I still primarily use clang for other reasons, but saying that GCC is more performant seems to be entirely valid.
- maxerickson 8y agoThe answer is in the paragraph you quoted from. "work with" includes extending the implementation.
- callinyouin 8y agoI was with you until the end of your comment: > llvm + clang is actually open source (more open) via a MIT license instead of gpl How is a license that allows someone or some corporation to take some code, add to it, and make those additions proprietary "more open" than a license that specifically disallows that type of scenario? The GPL ensures that derived code stays open while MIT does not. In my eyes, that's "actually open source". I can see the argument that licenses like MIT allow consumers of some piece of code more freedom to do as they please, but that hardly makes it more open.
- protomyth 8y agoHow is a license that allows someone or some corporation to take some code, add to it, and make those additions proprietary "more open" than a license that specifically disallows that type of scenario? This gets argued all the time. What the corporation did was freedom for them not the code. GPL protects the code, MIT/BSD protects the people. Depending on your definition of "freedom" you will prefer one over the other.
- wtetzner 8y agoGPL protects the freedom of the users of the software.
- protomyth 8y agoIt protects the code which happens to protect the users, but it doesn't let people do whatever they want with the code. Which you prefer is up to you. Using the word freedom is just problematic when there are restrictions.
- nuclearburrito 8y agoThe GPL's aim is keep openness for the end user as well as developers. BSD/MIT, etc. is aimed squarely for the benefit of developers. I far and away prefer GPL3 over anything else. I'm somewhat disappointed the Linux kernel and important tool chain programs are still under GPL2. I'm not an RMS fanboy by any stretch, but in the end, his views on the overarching concerns of GPL licensing and free/libre software are usually born out as true.
- xenophonf 8y ago> clang is actually open source (more open) via a MIT license instead of gpl Here's the obligatory retort that open source != free software: GPL (et al) is about guaranteeing end users' freedom to tinker, as opposed to MIT (et al), which are about allowing developers to use someone else's work in their product without restrictions. GPL enforces a share-and-share-alike ethos, while MIT asserts do-what-thou-wilt. They're not the same end goals.
- deleted 8y ago[deleted]
- froydnj 8y agoGCC is written in C++ nowadays.
- dmm 8y ago> most importantly llvm + clang is actually open source (more open) via a MIT license instead of gpl. Being allowed to do more things isn't necessarily freedom. For example, is a society where I can enslave people a freer society? I don't think so. The GPL protects the freedom of software /users/. I the same way that prohibiting slavery protects potential slaves, at the expense of limiting the actions of slavers. For example, when OS X used GCC all OS X users could get the full and exact source of the compiler their system used. Now that OS X uses LLVM that isn't the case. You can get something close but Apple includes proprietary changes.
- Avamander 8y agoThis is an absolutely standard issue with developers looking at licenses from their perspective rather than the users's. It's tiresome to remind people to please remember, GPL tries to ensure user freedoms that might not align with what developers would want, this does not make it less free, it makes it less free for developers.