There is an optional flag for configure which enables optimization flags for the compiler:
configure --with-optimization