There is danger here of causing “performance flapping” where the system never reaches a steady state, let alone the optimal state. Check out this (imo modern classic) paper:
https://arxiv.org/pdf/1602.00602v3
Also found this video on the same subject for those who prefer a video format:
Not an insurmountable problem but one does have to be careful. One of this nice things that Julia has going for it is that since it is a Just Ahead of Time compiler that compiles like an AoT compile but just in time, it has very predictable performance characteristics, whereas VM “JITs” which are actually not in time but after time, have pretty complicated performance behavior that depends on the data they encounter and the environment in which they execute—for better and worse. The key point of that paper is that it is not all upside, there is a real downside.