[cfe-dev] Compilation benchmark: bzip2
Sanghyeon Seo
sanxiyn at gmail.com
Sat Dec 22 20:49:45 PST 2007
I decided to measure clang's performance by compiling bzip2.
bzip2 is available from http://www.bzip.org/
Makefile used for benchmark is here:
http://sparcs.kaist.ac.kr/~tinuviel/devel/llvm/Makefile.bzip2
Intel(R) Core(TM)2 CPU T7200
Debian GNU/Linux Sid up-to-date 2007-12-23
bzip2 1.0.4
LLVM and clang SVN r45330 Release
GCC (Debian 4.2.2-4)
tcc (0.9.24)
Result (Minimum of 3):
tinuviel at debian:~/clang$ tar zxf src/bzip2-1.0.4.tar.gz
tinuviel at debian:~/clang$ cp make/Makefile.bzip2 bzip2-1.0.4/Makefile
tinuviel at debian:~/clang$ cd bzip2-1.0.4
tinuviel at debian:~/clang/bzip2-1.0.4$ make -s
GCC: real 0.613s user 0.556s sys 0.052s
tcc: real 0.046s user 0.028s sys 0.012s
GCC -S: real 0.555s user 0.488s sys 0.052s
clang: real 0.298s user 0.248s sys 0.040s
clang+llvm-as: real 0.636s user 0.576s sys 0.048s
Analysis:
clang -emit-llvm is about twice faster than gcc -S.
tcc has an internal assembler.
clang+llvm-as is a bit slower than gcc.
clang+llvm-as spent about half the time in assembler.
gcc spent less than 10% time in assembler.
tcc is more than ten times faster than clang or gcc.
--
Seo Sanghyeon
More information about the cfe-dev
mailing list