BSD Challenge

This is where things get a bit difficult.

I know people love to compare compilers… But for instance, let’s take GCC and Clang.

GCC supports far more languages such as Go and Java, but Clang is much faster and consumes less memory. So, here we have a conundrum because for 1. there’s no way in hell you’re compiling Go with Clang and 2. you can’t dock points from GCC for being slower as it is built to the standards of several languages without AST support.

Comparing compilers for this reason is almost useless.

What you can compare however are optimizations.

For instance, a kernel compiled with Clang will almost without a doubt always be faster than one compiled by GCC due to how Clang issues optimizations.

At the same time, one compiler may be better suited for one driver than another thus causing slow downs if optimizations are discarded.

It’s Pandora’s Box. It’s not definitive. I can say X is better than Y for usecase Z, but I can’t say X is always better than Y.

1 Like

I only care about C :wink:

2 Likes

Clang for performance. GCC for licensing issues.

3 Likes

Is this a joke? GCC is typically higher performance and offers wider support for obscure architectures (by nature of having been around a long time). Clang is favorable for its permissive license and modular architecture enabling wide reusability of its components for things like clang-format and easy development of new languages (such as Rust) while being able to share optimizations at various levels.

2 Likes
1 Like

ah fuck. right, wrong thread. You guys made so many BSD threads.

2 Likes

Yeah. I’ll wiki this one.

1 Like

Your OP is a wiki and you are gunna like it!

4 Likes

image

it begins


after you bois


tfw

image

5 Likes

Great job/idea of using a table.

5 Likes

gek likes to be useful sometimes

5 Likes

Gek is very useful

5 Likes

Does it notify anyone tagged in the list when we edit the wiki? coz that might be annoying

4 Likes

Fucking yes

But I don’t mind.

4 Likes

I have a fix. I think


There, just changed to links

3 Likes

:joy:

Poor Admindev

3 Likes

Comparative to the compilation of Linux? Yes. I am very serious. Torvalds called out the faults with Clang and its license awhile ago meanwhile Google is shifting over to Clang in their builds due to the added performance benefits. Yes, GCC supports more architectures. I had never said that it didn’t. I did say however that due to it’s ability to act as a library it has the added flexibility of supporting (at least in the case of ARM, from first hand experience) notably more levels of optimizations in a cleaner way.

We (CarbonROM) actually run tests annually with new revisions of GCC and Clang to determine what will provide the best performance overall. Again, we do this with embedded devices so results differ.

I will not lie. In benchmarks on x86 Clang and GCC 8 trade blows, but for chipsets such as the Cortex-A53 and so on, there is enough of a negligible performance difference that does make Clang a more viable solution for inline compilation.

2 Likes

image

:joy:

4 Likes

What could there possibly be to complain about here https://en.wikipedia.org/wiki/University_of_Illinois/NCSA_Open_Source_License

2 Likes

Ask him: [email protected]

1 Like