Compiler Optimizations

Compiler Optimizations

If you are owner of a Pentium, an AMD K6 or Athlon CPU, you might want to use an optimized compiler to compile your version of Kwave that is running some percents faster. The gain in speed will be up to 30% on some systems, whereas the functions dealing with signal manipulation and all functions that do complex time-frequency operations (like FFT and Sonagram) will profit most from it.

You do not need to understand much about programming for using an optimized compiler to compile Kwave, but maybe you will need some time to get the compiler itself working and installed.

How to invoke the optimized compiler

The invocation of an optimized compiler is quite simple. It normally is sufficient to set the environment variable CXXFLAGS in the correct way and then compile as usual. For the best settings please consult the documentation or homepage of the corresponding compiler.

If you build Kwave from a source tree (unpacked tar.gz or from CVS) the flags need to be specidied before the call to configure. This might look like this:

% CXXFLAGS="-march=athlon -mcpu=athlon" ./configure

If you re-build Kwave from a source rpm package the flags need to be specidied before the call to rpm --rebuild. This might look like this:

% CXXFLAGS="-march=athlon -mcpu=athlon" rpm --rebuild filename

Note

And please don't give up if rpm refuses to install your package because it seems not to fit to your computer's architecture. Normally you can just install an optimized package by specifying the additional parameter --ignorearch and just don't care.

Pentium and Compatibles

For all optimized versions I used pgcc-2.95.3. For informations on obtaining the pgcc compiler, visit the Homepage of the the Pentium Compiler Group. They also have binaries for most common platforms. The compiler does not only work for all known Pentium derivates from Intel but also for some other manufactors like Cyrix.

KDE Logo