Previous: , Up: Installing MPIR   [Index]


2.7 Performance optimization

For optimal performance, build MPIR for the exact CPU type of the target computer, see Build Options.

Unlike what is the case for most other programs, the compiler typically doesn’t matter much, since MPIR uses assembly language for the most critical operations.

In particular for long-running MPIR applications, and applications demanding extremely large numbers, building and running the tuneup program in the tune subdirectory, can be important. For example,

cd tune
make tuneup
./tuneup

will generate better contents for the gmp-mparam.h parameter file.

To use the results, put the output in the file indicated in the ‘Parameters for ...’ header. Then recompile from scratch.

The tuneup program takes one useful parameter, ‘-f NNN’, which instructs the program how long to check FFT multiply parameters. If you’re going to use MPIR for extremely large numbers, you may want to run tuneup with a large NNN value.