# Notes on performance measures during development#### Commit e34ea267 - 05.12.2019 - First Version of new Algorithm - Scaling ProblemsThe first version of our memory trading work stealing algorithm works. It still shows scaling issues overthe hyperthreading mark, very similar to what we have seen in version 1. This indicates some sort ofcontention between the threads when running the FFT algorithm.Analyzing the current version we find issue with the frequent call to `thread_state_for(id)` inthe stealing loop.![](./media/e34ea267_thread_state_for.png)It is obvious that the method takes some amount of runtime, as FFT has a structure that tends to onlywork on the continuations in the end of the computation (the critical path of FFT can only be executedafter most parallel tasks are done).![](./media/e34ea267_fft_execution_pattern.png)What we can see here is the long tail of continuations running at the end of the computation. Duringthis time the non working threads constantly steal, thus requiring the `thread_state_for(id)`virtual method, potentially hindering other threads from doing their work properly.