• Corbin@programming.dev
      link
      fedilink
      English
      arrow-up
      1
      ·
      21 days ago

      This is a common misconception! It is true that, of the Smalltalk descendants, Python was not designed for speed like Self or Java; but it was not designed to be slow or difficult to compile. The main technique required to implement a Python JIT is virtualizable objects, which allows the JIT to temporarily desynchronize the contents of registers from the contents of the heap; it’s not obvious and wasn’t in the first few iterations of PyPy. Additionally, it turns out that tracing the meta-level (see docs or the paper) is a key trick: instead of JIT’ing the Python program, the JIT operates on the interpreter, on the Python VM itself!

      • FizzyOrange@programming.dev
        link
        fedilink
        arrow-up
        0
        arrow-down
        1
        ·
        22 days ago

        That ignores just how slow it is. It’s on the order of 100x slower than “fast” languages like Rust and Go, so doubling in speed… while nice for Python Devs doesn’t really make it fast on an absolute scale. They need to double it’s speed a few more times at least.

  • Lemminary@lemmy.world
    link
    fedilink
    arrow-up
    0
    arrow-down
    2
    ·
    22 days ago

    Please don’t show a close-up image of a snake, or at least add a spoiler! It’s irrelevant to the topic, and it just sets some of us on edge for no good reason. If it’s small, it’s fine, but this… holy shit, now I have a headache. It’s one of the reasons I stopped coding in Python altogether.