https://123dok.net/document/zwvdn57q-periodicity-is-optimal-for-offline-and-online-multi-stage-adjoint-computations.html