[Beowulf] Re: Peformance penalty when using 128-bit reals on AMD64

David Mathog mathog at caltech.edu
Fri Jun 25 11:26:20 PDT 2010


Prentice Bisbal <prentice at ias.edu> wrote:

> One of my Fortran programmers had to increase the precision of his
> program so he switched from REAL*8 to REAL*16 which changes the size of
> his variables from 64 bits to 128 bits. The program now takes 32x longer
> to run.

Doubling the size of the variables can increase the size of the arrays
that hold them so that what once fit comfortably into the fastest parts
of memory no longer does.  Depending on memory access patterns that can
easily result in a 16X drop in speed.  (2X would normally be lost either
way because there is twice as much data to move.)

You didn't say why he had to change the precision.  If it was a
numerical stability issue, well, if the algorithm doesn't work for R*8
going to R*16 may not be a reliable way to calm things down.  If this is
a case where the exponents are out of range perhaps the whole problem
can be scaled up or down by some constant factor so that the numbers
once again fit into the range of exponents supported by R*8?

Regards,

David Mathog
mathog at caltech.edu
Manager, Sequence Analysis Facility, Biology Division, Caltech



More information about the Beowulf mailing list