[cfe-dev] speed of clang++
Rafael Espindola
espindola at google.com
Sun Jan 24 19:22:03 PST 2010
> ivan at ivan-desktop:~/d/llvm-build/Release/bin$ time ./clang++ 1.cpp
>
> real 0m1.450s
> user 0m1.300s
> sys 0m0.130s
>
> ivan at ivan-desktop:~/d/llvm-build/Release/bin$ ./a.out
> 8191
> ivan at ivan-desktop:~/d/llvm-build/Release/bin$ time g++ 1.cpp
>
> real 1m8.859s
> user 1m8.520s
> sys 0m0.170s
GCC 4.5 is faster, but clang still wins. With -S to test just the compiler:
$ time ~/llvm/llvm-build/Release/bin/clang++ -S
/home/espindola/gcc/test.cc -o t.s
real 0m0.530s
user 0m0.490s
sys 0m0.030s
$ time ~/gcc/inst-x86/bin/g++ -S /home/espindola/gcc/test.cc -o t.s
real 0m1.107s
user 0m1.080s
sys 0m0.030s
Not that 2.09x faster is bad :-)
Cheers,
--
Rafael Ávila de Espíndola
More information about the cfe-dev
mailing list