How to increase the speed of this program?
__peter__ at web.de
Tue Nov 28 09:49:23 CET 2006
> I want to join two mono wave file to a stereo wave file by only using
> the default python module.
> Here is my program, but it is much slower than the C version, so how
> can I increase the speed?
> I think the problem is at line #1, #2, #3.
> oarray = array.array("h", *(len(larray)+len(rarray))) #1
ITEMSIZE = 2
size = ITEMSIZE*(len(larray) + len(rarray))
oarray = array.array("h").fromstring("\0" * size)
may be a bit faster.
More information about the Python-list