I am using numpy.load in runtime as my application loads different numpy array based on external event.
My application is really low-latency oriented and I am struggling with numpy.load. I noticed that everytime i use numpy.load on particular array(saved as npy), the loading time is pretty slow(~0.2-0.3s), but every other time i do it again, the time is dramaticly reducing so after 2,3rd load it is even as low as 0.01s.
I am using classical syntax
data = np.load(name)
Later on, I pass data into some processing function and rewrite variale data
data = None
So my question is, what is happening? And if there is some kind of cache, can I load and rewrite all arrays in the beginning of the script so whenever I load array, its fast? If so, will the memory suffer?
Thanks in advance