CPython VM internals - Wiki page

Discussion in 'Python' started by Terry Reedy, Jul 22, 2008.

  1. Terry Reedy

    Terry Reedy Guest

    Various people have asked on c.l.p about documentation of CPython's
    virtual machine internals. The usual answers have been to see the dis
    module doc for bytecodes and 'read the code' for more. Jakob Sievers
    did so and posted his notes, with additions from Martin v. Löwis, as

    http://wiki.python.org/moin/CPythonVmInternals
    Terry Reedy, Jul 22, 2008
    #1
    1. Advertising

  2. Terry Reedy

    John Nagle Guest

    Terry Reedy wrote:
    > Various people have asked on c.l.p about documentation of CPython's
    > virtual machine internals. The usual answers have been to see the dis
    > module doc for bytecodes and 'read the code' for more. Jakob Sievers
    > did so and posted his notes, with additions from Martin v. Löwis, as
    >
    > http://wiki.python.org/moin/CPythonVmInternals


    That's interesting. It's dumber than I thought. All temporaries
    on the stack are "boxed" as PyObjects. That's simple and portable,
    but slow.

    John Nagle
    John Nagle, Jul 22, 2008
    #2
    1. Advertising

  3. > That's interesting. It's dumber than I thought. All temporaries
    > on the stack are "boxed" as PyObjects. That's simple and portable,
    > but slow.


    Not only that - Python does not ever have the concept of unboxed
    values, except for local variables in the C implementations of
    arithmetic operations and system calls.

    Using true objects is slow only if allocation and deallocation is
    slow, which it fortunately isn't.

    Regards,
    Martin
    Martin v. Löwis, Jul 22, 2008
    #3
    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. chris
    Replies:
    4
    Views:
    888
    chris
    May 17, 2004
  2. Jobs Gooogle
    Replies:
    2
    Views:
    472
    Patricia Shanahan
    May 11, 2007
  3. Jobs Gooogle
    Replies:
    1
    Views:
    312
    Victor Bazarov
    May 10, 2007
  4. Jobs Gooogle

    .Net VC++ Java C++ Windows Internals Unix Internals

    Jobs Gooogle, May 10, 2007, in forum: C Programming
    Replies:
    0
    Views:
    351
    Jobs Gooogle
    May 10, 2007
  5. Jobs Gooogle
    Replies:
    0
    Views:
    122
    Jobs Gooogle
    May 10, 2007
Loading...

Share This Page