This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: FLOATING-POINT CONSISTENCY, -FFLOAT-STORE, AND X86


> Contrary to an opinion put forth in this exchange, I see that alignment of
> 64-bit spills makes a measurable difference in performance on my Pentium 2.
> 
> I noticed, somewhat accidentally, that Livermore Fortran Kernel 8 runs 10%
> faster when linked with cygwin-b20.1 than with cygwin-b19/coolview.  I built
> the compiler today under cygwin-b19, and the performance of all the other
> kernels was unchanged from the previous version of egcs/g77.  Relinking the
> same .o with the different .dll made the difference, and it made no difference
> whether I ran under bash linked with one .dll or the other.

Just as another data point the BRL-CAD raytracing benchmarks run about 5%
faster when the compiler properly aligns doubles.  The current state of the
patch for this is:

  1) It only affects leaf functions.

  2) It aligns all registers spills as necessary and all simple uses
     of double / long double variables.

Open issues:

  1) The patch requires a frame pointer for those functions where that stack
     needs alignment.  I haven't run the BRL-CAD raytracing benchmarks with
     -fomit-frame-pointer to see if the proper alignment is worth requiring
     a frame.

  2) The patch currently doesn't provide alignment for variables such as:

     double a[10]

  3) The patch currently doesn't provide alignment in non-leaf functions.

  4) GDB will probably need updating due to the i386 prologue changes.

If I recall correctly, the main Pentium Pro / Pentium II performance hit
is when a double or long double crosses a cache boundary (which can happen
if they're not aligned correctly).

-- John
-------------------------------------------------------------------------
|   Feith Systems  |   Voice: 1-215-646-8000  |  Email: john@feith.com  |
|    John Wehle    |     Fax: 1-215-540-5495  |                         |
-------------------------------------------------------------------------


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]