When I’m on a Julia REPL that has been running for a while, I find that julia will slow down, but if I restart the REPL, the speed returns to normal.
For example, I have a function denoted f(x), that takes 15 minutes in REPL, then I execute other un-related functions like g(x), z(x)… , then a few hours pass and I execute f(x) again and it will actually take about 28 minutes, I restart a new REPL and execute the same function and this time it will only take 15 minutes again. ( The above times are after compilation).
I have enough RAM and no other tasks on my computer, I checked the CPU rate and found that when my function run on the “fresh” REPL, the CPU% could up to 80%, and run on a REPL that has been running for a few hours, it will only take 50-60% CPU.
Sorry for no actually code for demo, I don’t know if this is a common or plausible phenomenon, or if it’s just something very specific in my case. Have you ever been in a similar situation?
There is no special setup in my julia environment. I only notice this behavior when I train neural network model with Flux. I’ll pay a little more attention to memory allocation next time.