[LLVMdev] Starting with LLVM-GCC on Cygwin

Chris Lattner sabre at nondot.org
Tue Oct 5 10:16:19 PDT 2004


On Tue, 5 Oct 2004, Alex Vinokur wrote:

> I would like to use LLVM-GCC to compare its performance with other compilers.
> Something like testsuite "Computing very large Fibonacci numbers" at
> http://article.gmane.org/gmane.comp.lang.c%2B%2B.perfometer/37.

Out of curiousity, I ran some quick tests on a AMD Athlon(TM) MP 2100+ box
running Redhat linux 7.1.

With the LLVM C backend and GCC 3.3 -O3, I got:

$ time Output/bigfib.cbe th 50000 > /dev/null
0.800u 0.190s 0:00.99 100.0%    0+0k 0+0io 245pf+0w
$ time Output/bigfib.cbe th 50000 > /dev/null
0.800u 0.190s 0:00.99 100.0%    0+0k 0+0io 245pf+0w
$ time Output/bigfib.cbe th 50000 > /dev/null
0.770u 0.230s 0:00.99 101.0%    0+0k 0+0io 245pf+0w

Native GCC 3.3 -O2:

$ time Output/bigfib.native th 50000 > /dev/null
1.010u 0.170s 0:01.18 100.0%    0+0k 0+0io 234pf+0w
$ time Output/bigfib.native th 50000 > /dev/null
1.030u 0.160s 0:01.17 101.7%    0+0k 0+0io 234pf+0w
$ time Output/bigfib.native th 50000 > /dev/null
1.000u 0.170s 0:01.16 100.8%    0+0k 0+0io 234pf+0w

Native GCC 3.3 -O3:

$ time Output/bigfib.native th 50000 > /dev/null
0.940u 0.150s 0:01.08 100.9%    0+0k 0+0io 235pf+0w
$ time Output/bigfib.native th 50000 > /dev/null
0.930u 0.150s 0:01.07 100.9%    0+0k 0+0io 235pf+0w
$ time Output/bigfib.native th 50000 > /dev/null
0.890u 0.200s 0:01.08 100.9%    0+0k 0+0io 235pf+0w

Note that this benchmark allocates a TON of memory, so it's not a
wonderful benchmark of CPU bound tasks (also, the compiler in use will
have less impact than for a CPU bound program).  In any case, I've added
this program to the LLVM testsuite as
SingleSource/Benchmarks/Misc-C++/bigfib.cpp, so we should have numbers for
it generated every night on multiple platforms.

-Chris

-- 
http://llvm.org/
http://nondot.org/sabre/





More information about the llvm-dev mailing list