Compiler loop optimizations

2006-12-28 Thread Christian Sturz
Hi, I was curious if there are any gcc compiler optimizations that can improve this code: void foo10( ) { for ( int i = 0; i < 10; ++i ) { [...] if( i == 15 ) { [BLOCK1] } } } void foo100( ) { for ( int i = 0; i < 100; ++i ) { [...] if( i == 15 ) { [BLOCK2] } } } in

Gprof and shared libraries

2006-12-28 Thread Christian Sturz
Hi, I've a larger project that consists of several shared libraries. The compilation is done by autoconf and automake. One of the libraries seems to be slow so I would like to profile it. My idea was to use gprof (I'm using gcc 3.4.6). First, I modified the Makefiles so that each library is built