2013/4/2 Tomasz Hemperek <thempe...@gmail.com>:
>
> Dear All,
>
> I am not sure if i should open a ticket so I am writing here.
> Remark: I am very new to python (1 week).
>
> I found that small change improves max read transfer speed.
> In my case from ~5MB/s to ~15MB/s (~15MB/s is the limit for this device).
>
> The problem is in initialization of _interop.as_arrary
>
> Example in libusb1.py in __read function the memory is allocated this way:
>   data = _interop.as_array((0,) * size)
> this creates a tuple of size and then an array.
>
> If you change initialization to
>    data = _interop.as_array( '\x00' * size )
> makes it much faster.
>
> Example speed test: http://dl.dropbox.com/u/2937630/code/array_init_test.py
>
> For write - core.write could recognize if it receives type==array.array ant
> not to reinitialize memory.
>

Sorry for the long delay in answering your question. Would you mind
opening a ticket in github?

-- 
Best Regards,
Wander Lairson Costa

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users

Reply via email to