Changeset 7034


Ignore:
Timestamp:
May 14, 2009, 1:44:08 PM (11 years ago)
Author:
ole
Message:

Comments on the fast sqrt approximations. They don't give speedup on AMD 64, so have been left alone until further notice.
Timings included in the code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/shallow_water/shallow_water_ext.c

    r6840 r7034  
    223223
    224224
    225 // Optimised squareroot computation (double version, slower)
     225// Optimised squareroot computation (double version)
    226226double Xfast_squareroot_approximation(double number) {
    227227  double x;
     
    323323 
    324324  // Code to use fast square root optimisation if desired.
     325  // Timings on AMD 64 for the Okushiri profile gave the following timings
     326  //
     327  // SQRT           Total    Flux
     328  //=============================
     329  //
     330  // Ref            405s     152s
     331  // Fast (dbl)     453s     173s
     332  // Fast (sng)     437s     171s
     333  //
     334  // Consequently, there is currently (14/5/2009) no reason to use this
     335  // approximation.
     336 
    325337  //soundspeed_left  = fast_squareroot_approximation(g*h_left);
    326338  //soundspeed_right = fast_squareroot_approximation(g*h_right);
Note: See TracChangeset for help on using the changeset viewer.