My desire is to spread the computation over multiple frames. In this way I can show something during the computation (partial outcomes of the algorithms, a progress bar or anything else).
For other didactical algorithms I had used a coroutine with WaitForEndOfFrame at the end of each top-level iteration, but it obviously waste too much time in a real application.
There is a way to perform this computation in an asynchronous way?
Either you work with coroutines and place a yield aftr a computation block or you use threading to get access to the asynchronous way. Have a look into my thread helper asset which can make it a little bit easier for you, depending on what you are doing.
For sure, using yield is the simplest way but I have some concerns on the overall performance. I have to find good spots where to put the yield instructions and hope for the best.