[LLVMdev] Newbie question
Duncan Sands
baldrick at free.fr
Thu Jul 2 06:15:33 PDT 2009
Hi Renato,
> For the C code I got smaller and faster programs, excellent! But for
> the C++ it was a bit of a shock to see a 100x increase in size. The
> execution time is 2-fold, but the programs are to simple and too fast
> to make any difference meaningful.
with llvm-g++ from subversion, and on x86-64 linux, I also see that
virtual.llvm-gpp is larger than virtual.gpp, but by a factor of 3.
The sizes of the .o files are:
g++: 9704 bytes
llvm-g++: 10728 bytes
so the size difference comes from linking. If I link them both
using g++ then the final executable sizes are:
g++: 19881 bytes
llvm-g++: 21721 bytes
so the actual difference is due to some details of how llvm-g++ is
doing the linking. I don't know what these details are though.
Ciao,
Duncan.
More information about the llvm-dev
mailing list