SunnySuite / Sunny.jl

Spin dynamics and generalization to SU(N) coherent states
Other
86 stars 19 forks source link

Indexing refactor and related optimizations #25

Closed ddahlbom closed 2 years ago

ddahlbom commented 2 years ago

PR contains the following changes:

@mswwilson Could you try running something that uses WangLandau.jl and ReplicaExchangeMC.jl? I don't think they are tested in the test suite. Note that I changed the name of the SpinSystem in the samplers from system to sys for consistency with the integrators. I updated those to files to account for this, but they should be tested. It would also be good to make sure the new indexing didn't mess anything up with your code.

The re-indexing and addition of @inbounds seems to lead to a general improvement of about 10% in many situations. For SU(N) integration tasks, the use of StaticArrays for N < 6 gives an additional ~2X. The regular dipole energy calculation is maybe 33% faster, but the performance of the FFT accelerated version is unchanged.