I have big project written in C++. It might have some stability problems (i.e. random runtime), but I\'m not sure about it. I understand that execution time, measured by wal
This is absolutely normal. There are many effects that cause this. In fact repeatability for performance experiments is very difficult to achieve.
Any performance involving memory heavily depend on whether the cache is used or not:
The operating system schedules another thread on your core? Even if the time of this thread doesn't count for your process clock, it can evict your working data from the cache and your program runs slower afterwards.
The operating system decides to move your thread to another core? The core-local cache doesn't contain your working data. In a parallel application, the mapping from threads to cores has a huge impact on performance.
The operating system decides to run another memory-intense thread on in parallel (on a different core)? Your application has less shared cache and memory bandwidth available.
On a recent system you likely use turbo mode - that changes CPU frequency based on many parameters including temperature.
Modern CPUs have many heuristics that effect performance. For instance a branch predictor guesses which branch you take for a jump based on past "experience". Your performance varies greatly whether that guess is right or not, as explained in detail in this epic answer. There are other components like that, for example prefetchers.
Clocks are not perfect either. They have limited resolution and accuracy. They can drift over time - or differ among cores. As indicated by Weather Vane, the software on top of the clocks can also be wrong.
This is by far a comprehensive list, just some examples.