This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: g++ doesn't unroll a loop it should unroll



On Dec 13, 2006, at 17:09, Denis Vlasenko wrote:


# g++ -c -O3 toto.cpp -o toto.o
# g++ -DUNROLL -O3 toto.cpp -o toto_unroll.o -c
# size toto.o toto_unroll.o
   text    data     bss     dec     hex filename
    525       8       1     534     216 toto.o
    359       8       1     368     170 toto_unroll.o

How can C++ compiler know that you are willing to trade
so much of text size for performance?

Huh? The unrolled version is 30% smaller, isn't it?


-Geert


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]