igfuw / libmpdataxx

libmpdata++ - a library of parallel MPDATA-based solvers for systems of generalised transport equations
Other
11 stars 15 forks source link

performance improvements ideas #174

Closed slayoo closed 4 years ago

slayoo commented 9 years ago
  1. check if increasing halo to get proper alignment would increase performance? (of course the idea is to increase the amout of allocated memory, but not to increase the amount of data exchanged in boundary condition logic)
  2. check if storing blitz expressions would reduce OO-overhead (e.g. the antidiffusive velocities), here's an example:

    include <blitz/array.h>

    using arr_t = blitz::Array<double, 2>; using rng_t = blitz::Range;

    int main() { rng_t i(0,10), j(0,10); arr_t a(i,j), b(i,j); auto xpr = 2 * a(i,j) * b(i,j);

    a = 2; b = 2;

    for (int i=0; i<10; ++i) a = xpr;

    std::cerr << a << std::endl; }

  3. replace where()s in FCT code with zero-multipliers
  4. check if consts, noexcepts or copy-instead-of-ref (or vice-versa) could help
  5. local copies of class members (e.g. ijk)?
  6. check out superoptimisers: http://en.wikipedia.org/wiki/Superoptimization
  7. try turning on vectorisation pragmas for GCC in Blitz++ code
  8. reduce unnecesarry barriers

... finally, check alternatives for Blitz...

slayoo commented 4 years ago

well...