Python Pipe Throughput

I did a very simple pipe throughput test using the Python API today and got rates around 0.9MB/s each way, with an XEM6001 (USB2). I suspect this is due to the limitation that the python pipe function wrappers don’t take a length parameter so the data is going 1kB per call max.

Does anyone know why the Python wrapper doesn’t accept a length argument? Has anyone attempted to write their own Python wrapper to overcome this limitation? Is anyone getting much higher rates than I am?

Through an exchange with OpalKelly support, I found out that the length parameter is derived from the length of the bytearray buffer you pass to the read/write pipe calls. I’d seen the note in the API documentation but didn’t take it to mean this was happening. Here’s the note:
“Python Note: Within Python, the ‘length’ parameter is not used and the ‘data’ parameter is mutable type bytearray.”
Perhaps it could be better stated.

Regardless, by extending the size of the bytearray, the throughput is close to that claimed (~40MB/s).