RE: __slots__ vs __dict__

Discussion in 'Python' started by Hornberger, Chris, May 12, 2004.

  1. >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


    Card carrying MSDN member since 2004.
    No, really. I've got the card to prove it.
    Hornberger, Chris, May 12, 2004
    #1
    1. Advertising

  2. Well,

    I am not aware of function in Python which returns
    the current process' memory usage. Is there one?

    /Jean Brouwers
    ProphICy Semiconductor, Inc.



    In article <>,
    Hornberger, Chris <> wrote:

    > >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
    >
    >
    > Card carrying MSDN member since 2004.
    > No, really. I've got the card to prove it.
    >
    Jean Brouwers, May 12, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jp Calderone
    Replies:
    1
    Views:
    513
    =?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=
    Jul 6, 2003
  2. simon place

    PEP idea. ( removing __slots__ )

    simon place, Jul 5, 2003, in forum: Python
    Replies:
    6
    Views:
    325
    Ulrich Petri
    Jul 7, 2003
  3. Replies:
    1
    Views:
    329
    Alex Martelli
    Nov 6, 2003
  4. Derek Fountain

    When is a __dict__ not a __dict__?

    Derek Fountain, Apr 21, 2004, in forum: Python
    Replies:
    1
    Views:
    323
    John Roth
    Apr 21, 2004
  5. Jean Brouwers

    __slots__ vs __dict__

    Jean Brouwers, May 12, 2004, in forum: Python
    Replies:
    5
    Views:
    505
    Marcus von Appen
    May 13, 2004
Loading...

Share This Page