[cfe-dev] Compilation benchmark: bzip2

Steve Naroff snaroff at apple.com
Sat Dec 22 20:56:16 PST 2007


I assume the clang binary was an optimized "release" build?

snaroff

On Dec 22, 2007, at 8:49 PM, Sanghyeon Seo wrote:

> 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
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev




More information about the cfe-dev mailing list