spirit-code / spirit

Atomistic Spin Simulation Framework
http://spirit-code.github.io
MIT License
117 stars 52 forks source link

Core: how to improve Method class for single-iteration use case? #434

Closed GPMueller closed 6 years ago

GPMueller commented 6 years ago

The Problem with the SingleShot API function and PlayPause with a single iteration is that a Method instance has to be created. When e.g. sampling with single iterations (or only a few), the resulting overhead is significant! How could this be avoided?

The main problem with keeping around an instance of Method while it is potentially unused is that this may use a significant amount of memory. Depending on system size, this may be unacceptable.

Currently, my best idea is:

GPMueller commented 6 years ago

Changed the API and implemented the better single-shot procedure with 06766639b24d2425c588564f95be4ba595be7da1 on feature-improved-api.

GPMueller commented 6 years ago

Merged into develop with eb841c5bd39941d4c437895845969c00ff224f10.