manpagez: man pages & more
info gmp
Home | html | info | man
[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.6 Performance optimization

For optimal performance, build GMP 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 GMP uses assembly language for the most critical operation.

In particular for long-running GMP 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 GMP for extremely large numbers, you may want to run tuneup with a large NNN value.


This document was generated on March 31, 2014 using texi2html 5.0.

© manpagez.com 2000-2024
Individual documents may contain additional copyright information.