Speedup of coherence and reduced memory impact
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)