Arithmetic without limitations?

Torbjorn Granlund tg at
Fri Feb 12 18:48:44 CET 2010

Paul Zimmermann <Paul.Zimmermann at> writes:

  as promised, here are more experiments, still with GMP 5.0.1. I added a swap
  file of 16GB to the computer I use (with 16GB of RAM and initially 4GB of swap)
  thus I have now 16GB of RAM and 20GB of swap.
  With GMP 5.0.1 I tried to multiply two numbers of 10G decimal digits, i.e.,
  519051266 limbs. Each number occupies about 4GB.
  After more than 6 hours of elapsed time, the computation is still running,
  and top says (no other job is running on this machine):
  Mem:  16475444k total, 16394992k used,    80452k free,      424k buffers
  Swap: 20688996k total, 20688924k used,       72k free,      432k cached
    PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND           
   3392 pzimmerm  20   0 38.7g  15g  128 D    9 96.2 101:19.42 a.out          
You've created a benchmark that could be useful for measuring disk
performance.  The best short-term GMP speedup would surely be to get
yourself an SSD disk. :-)


More information about the gmp-devel mailing list