Re: Pack optimization

2009-10-15 Thread Robert Kern
On 2009-10-15 13:57 PM, BDL wrote: I have a large amount of binary data that needs to be pushed across the network. It appears from profiling that the dominant time is being taken up by packing the data. (50%) Here is a CME that shows the problem. from numpy import random from struct import p

Re: Pack optimization

2009-10-15 Thread Paul Rubin
BDL writes: > Is there a faster method to do this? Is it possible to use array? array.tostring is the first thing I'd think of. -- http://mail.python.org/mailman/listinfo/python-list

Pack optimization

2009-10-15 Thread BDL
I have a large amount of binary data that needs to be pushed across the network. It appears from profiling that the dominant time is being taken up by packing the data. (50%) Here is a CME that shows the problem. from numpy import random from struct import pack import time lenstim = 10084200 s