On 8/22/06, Carlos Pita <[EMAIL PROTECTED]> wrote:
Is there any reason to keep allocating arrays if you are just using them as data buffers? It seems you should be able to reuse them. If you wanted to be fancy you could keep them in a list, which would retain a reference and keep them from being garbage collected.
Chuck
Hi! I'm writting a real time sound synthesis framework where processing units are interconnected via numpy arrays. These buffers are all the same size and type, so it would be easy and convenient pooling them in order to avoid excesive creation/destruction of arrays (consider that thousands of them are acquired and released per second, but just a few dozens used at the same time). But first I would like to know if numpy implements some pooling mechanism by itself. Could you give me some insight on this? Also, is it possible to obtain an uninitialized array? I mean, sometimes I don't feel like wasting valuable cpu clocks filling arrays with zeros, ones or whatever.
Is there any reason to keep allocating arrays if you are just using them as data buffers? It seems you should be able to reuse them. If you wanted to be fancy you could keep them in a list, which would retain a reference and keep them from being garbage collected.
Chuck
------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________ Numpy-discussion mailing list Numpy-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/numpy-discussion