Skip to content

Speedup of coherence and reduced memory impact

Emmanuel Branlard requested to merge wtlib/pyconturb:f/coherence_speedup into master

Hi @rink

With these changes I get a speed up between 3 and 10 (depending on the problem size) for the coherence computation, with less memory impact. I'm using the following to speed up the computation:

  • chunks of combinations (reduces memory storage)
  • component indices (avoid mask and unused combinations)
  • precomputation of exponential constants
  • possibility to compute in np.float32 or np.float64 (for now default is np.float64 for backward compatibility, I'll submit another merge request later to use dtype within gen_turb)

Hopefully this won't conflict with your plans for #20 (closed)

Edited by Emmanuel Branlard

Merge request reports