0

Does anybody know of a project (apart from the Linux monolithic kernel) where a/the program can be compiled by both the compilers and can be used to observe their performances, any recommendations ? Preferably the program/package is in debian, is not too big (no 200 MB plus downloads please) and yet good enough to say who is king of the hill for now.

  • 1
    I'm not sure what you are asking, "shootout"? If I had to guess, I'd say you are asking about software in a Linux distribution that can be compiled with both gcc and Clang. But if that is what you mean, you should say so. – Faheem Mitha Oct 20 '15 at 8:50
0

Not sure what you are asking, but Slackware supports and comes with both Gcc and Clang with its default install.

Also, there is no such thing as the GNU/Linux kernel. There is a GNU kernel (Hurd) and a Linux kernel (Linux).

0

If you want to compare performance of the compilers, there are many benchmarks floating around.

Be careful, it is certainly advantageous for a compiler to give "good" benchmark results, so it has been known that compilers added "optimizations" that hurt real uses in order to get better benchmarks (perhaps in good faith; benchmarking is easy, relevant real use data is very hard to come by), or even detect the benchmark and cut corners. Not accusing GCC or LVM here, just take comparisons with a shovelful of salt. Besides, a benchmark is a limited set of programs to be compiled/run, if your use differs substantially from the benchmark the results will be meaningless for you.

In the end, unless your application is to be run extensively (i.e., very long runs on your machine, running frequently on hundreds of machines and performance is critical), getting the "fastest program" is completely irrelevant (just look at how much of your Linux sysadmin commands are written e.g. in Python, which is a nice language but certainly holds no speed record; or how much "real use" software is being developed in byte-compiled Java or .Net). Your time as developer/troubleshooter is much, much more valuable than the computer's time, except under extreme circumstances. I'd evaluate a compiler by (a) reliability (if it crashes, or miscompiles my code, I'll be royally pissed off), (b) standards compliance (might be "bug- and extension-compatible to GCC du jour", not strictly "standard", if you want to compile or link against software developed by others), (c) user-friendly error messages, even (d) compilation speed. Performance of the generated code, if it even comes into consideration, much later.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.