SunnySuite / Sunny.jl

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

Get to zero allocations in sampling and dynamics #81

Closed kbarros closed 1 year ago

kbarros commented 1 year ago

With @Lazersmoke's recent excellent work in reducing allocations (https://github.com/SunnySuite/Sunny.jl/pull/78), I think we should push it all the way and ensure through unit tests that sampling and dynamics never allocate. We're not there yet, so this PR is aspirational. Progress can be added as commits on the branch zero-alloc, and we can merge this PR when all tests pass.

For reference, here is how to view where allocations are happening: https://docs.julialang.org/en/v1/manual/profile/#Allocation-Profiler

kbarros commented 1 year ago

We could move this to a static analysis if https://github.com/aviatesk/JET.jl/issues/286 is resolved.