A factor ten slowdown is typical for interpreted versus compiled programming languages.Hi. I am using Pi5 recently.
I was doing some simple tests for evaluating processing speed. The results I got can be summarized as following :
read/write from/to file (so on SD card) : around 330ns/byte
copy from variable to another variable (so SDRAM or equivalent) : around 330ns/byte.
I did the tests with block of approx 25MB and 250MB in order to optimize the time transfer and to have more accuracy on the measurements. I got the same results for the two sizes.
I would appreciate some expert comments here.
Also, I am certainly doing things wrong somewhere because RAM access "should be" ten time shorter....
some information :
I am coding with Python.
for the file access, I am doing it per byte.
for the copy from one variable to another below is my code (the variables are list()).
i=0
while i < file_length :
data_int.append(int(data_in))
i=i+1
I guess there are memory access commands like DMA based or other that I am not aware of....
I think Python has a JIT module.
https://numba.pydata.org/
If Numba works on the Raspberry Pi you could try it and see if it makes a difference.
Statistics: Posted by ejolson — Sat Jul 27, 2024 4:11 pm