__slots__ vs __dict__

Hornberger, Chris Chris.Hornberger at blackrock.com
Wed May 12 16:22:43 EDT 2004


>PS) The tests were run on a dual 2.4 GHz Xeon system with RedHat
>8.0 and Python 2.3.2.  The test script is attached but keep in mind
>that it only has been tested on Linux.  It will not work elsewhere
>due to the implementation of the memory() function.

When you're trying to eke out every last bit of performance, that's fine. However, I tend to shy away from using VM-based solutions (Java, Python, even .NET/C#) when they are tied to a platform. If I *must* do so, I farm out the platform-specific pieces to a library, and my main app gets some code added that knows how to load libraries on the fly. 

When feasible, mind you.

--------------------------
Chris Hornberger
Blackrock - 302.797.2318
chris.hornberger at blackrock.com

Card carrying MSDN member since 2004.
No, really. I've got the card to prove it.




More information about the Python-list mailing list