![](https://secure.gravatar.com/avatar/968b818b9553fbf74f79cf4b1db725a2.jpg?s=120&d=mm&r=g)
A few days ago, I found this page: http://mail.python.org/pipermail/python-list/2004-May/220513.html where speedups for creating objects using __slots__ is demonstrated. I have read somewhere that creation of numarrays is much slower than creation of Numeric arrays - so maybe using __slots__ should be considered? Just a suggestion from a happy numarray user! JJ
![](https://secure.gravatar.com/avatar/faf9400121dca9940496a7473b1d8179.jpg?s=120&d=mm&r=g)
On Fri, 2004-11-12 at 04:27, Jens Jorgen Mortensen wrote:
A few days ago, I found this page:
http://mail.python.org/pipermail/python-list/2004-May/220513.html
where speedups for creating objects using __slots__ is demonstrated. I have read somewhere that creation of numarrays is much slower than creation of Numeric arrays - so maybe using __slots__ should be considered?
Just a suggestion from a happy numarray user!
Thanks for the suggestion! I wondered about this before, but the idea fizzled through a combination of doubt about how much performance gain would be involved and the impression that using __slots__ would preclude creation of new attributes on basic NumArrays. Seeing real information about the performance motivates me to take a closer look, so thanks. I think placing the "no new attributes without subclassing" restriction on NumArrays is probably worth the gains and will check into it. This day is getting better and better, Todd
participants (2)
-
Jens Jorgen Mortensen
-
Todd Miller