project-rig / rig

A collection of tools for developing SpiNNaker applications.
GNU General Public License v2.0
4 stars 0 forks source link

Further SCP Performance Improvements #134

Open mundya opened 9 years ago

mundya commented 9 years ago

It occurs to me that if SCP reads and writes used memoryviews much more internally it may be possible to extract further performance improvements.

mundya commented 9 years ago

NB, because Numpy supports the buffer protocol this should allow:

sdram.write(addr, memoryview(my_numpy_array))

and

sdram.read_into(addr, memoryview(my_numpy_array))  # kwarg for number of bytes, maybe
mossblaser commented 9 years ago

Regarding rig-scp, as you'd expect, the "read" function is really "read-into": you supply a void-pointer into a block of memory to dump the read data into.

All this sounds rather good but I'd be tempted to postpone this until it is really necessary on the old KISS principle. After all, I think at the point where the small differences here make the difference, we're probably stuck anyway. Plus for non (0, 0) writes we're still massively I/O bound anyway. That said, don't let me block a weekend of fun ;).