You need a process of a large array of numbers (~ 1 Mb) in real time using a function, for example. void processData(char* data).
The following test was launched on the target platform:
int j = 10;
while(j--)
processData(dataPtr);
with the same data every time. He showed the following result:
- 1st launch takes ~ 22.5 m.
- 2nd run, and others ~ 12.5 ms
In my opinion, this may be due to the fact that on the second start, the data is already in the processor’s cache, so it works much faster.
Problem: in the real case, the data will be different each time.
Is there a way to do some sort of “preloading” the data into the cache?
source
share