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

  2. Terry Reedy

    John Nagle Guest

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

  3. That's interesting. It's dumber than I thought. All temporaries
    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. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.