CLANG vs GCC tests of fortran/f2c program

Wojciech Puchar wojtek at
Wed Jun 20 04:26:21 UTC 2012

i tested your test program, and in that case, contrary to testing common 
unix programs, difference is far higher showing gcc superiority.

i did this test with FreeBSD 9 supplied clang and FreeBSD 9 supplied gcc.

clearly shows that clang actually cannot do more agressive optimization 
(that trades space) at all, and at -O2 is far slower.


-rwxr-xr-x  1 tmp  tmp  11168 20 cze 06:18
-rwxr-xr-x  1 tmp  tmp  17024 20 cze 06:18
-rwxr-xr-x  1 tmp  tmp  17024 20 cze 06:18
-rwxr-xr-x  1 tmp  tmp  11096 20 cze 06:18 test.clang.O2
-rwxr-xr-x  1 tmp  tmp  11096 20 cze 06:18 test.clang.O3


real    0m2.877s
user    0m2.829s
sys     0m0.030s


real    0m2.142s
user    0m2.131s
sys     0m0.000s


real    0m2.071s
user    0m2.054s
sys     0m0.008s


real    0m3.440s
user    0m3.405s
sys     0m0.018s


real    0m3.217s
user    0m3.205s
sys     0m0.001s

How about leaving politics and getting back to technical grounds?

>From what i know now GPLv3 isn't really a problem for us, your may freely 
distribute binary only software compiled by latest gcc.

More information about the freebsd-questions mailing list