News for hackers. Stuff that matters.
Re:I built a hardware processor that runs Python by pjmlp on Monday April 28, 2025 @10:20AM (#43821803)
Solved by Smalltalk, Self, and Lisp JITs, that are in the genesis of JIT technology, some of it landed on Hotspot and V8.
Re:I built a hardware processor that runs Python by jonathaneunice on Monday April 28, 2025 @10:31AM (#43821926)
"Addressed" or "mitigated" perhaps. Not "solved." Just "made less painful" or "enough less painful that we don't need to run screaming from the room."
Re:I built a hardware processor that runs Python by pjmlp on Monday April 28, 2025 @10:55AM (#43822181)
Versus what most folks do with CPython, it is indeed solved.

We are very far from having a full single user graphics workstation in CPython, even if those JITs aren't perfect.

Yes, there are a couple of ongoing attempts, while most in the community rather write C extensions.

Re:I built a hardware processor that runs Python by Qem on Monday April 28, 2025 @11:40AM (#43822689)
> We are very far from having a full single user graphics workstation in CPython, even if those JITs aren't perfect.

Some years ago there was an attempt to create a linux distribution including a Python userspace, called Snakeware. But the project went inactive since then. See https://github.com/joshiemoore/snakeware

Re:I built a hardware processor that runs Python by pjmlp on Monday April 28, 2025 @12:08PM (#43823021)
I fail to find anything related to have a good enough performance for a desktop system written in Python.
Re:I built a hardware processor that runs Python by homarp on Monday April 28, 2025 @03:30PM (#43825074)
Sugar is built with python

https://github.com/sugarlabs/sugar

Re:I built a hardware processor that runs Python by jonathaneunice on Monday April 28, 2025 @12:26PM (#43823227)
Is "single user graphics workstation" even still a goal? Great target in the Early to Mid Ethernetian when Xerox Dorados and Dandelions, Symbolics, and Liliths roamed the Earth. Doesn't feel like a modern goal or standard of comparison.

I used those workstations back in the day—then rinsed and repeated with JITs and GCs for Self, Java, and on to finally Python in PyPy. They're fantastic! Love having them on-board. Many blessings to Deutsch, Ungar, et al. But for 40 years JIT's value has always been to optimize away the worst gaps, getting "close enough" to native to preserve "it's OK to use the highest level abstractions" for an interesting set of workloads. A solid success, but side by side with AOT compilation of closer-to-the-machine code? AOT regularly wins, then and now.

"Solved" should imply performance isn't a reason to utterly switch languages and abstractions. Yet witness the enthusiasm around Julia and Rust e.g. specifically to get more native-like performance. YMMV, but from this vantage, seeing so much intentional down-shift in abstraction level and ecosystem maturity "for performance" feels like JIT reduced but hardly eliminated the gap.

Re:I built a hardware processor that runs Python by kragen on Monday April 28, 2025 @04:09PM (#43825535)
"Single-user graphical workstation" may not be a great goal anymore, but it's at least a sobering milestone to keep failing at.

AFAIK there isn't an AOT compiler from JVM bytecode to native code that's competitive with either HotSpot or Graal, which are JIT compilers. But the JVM semantics are much less dynamic than Python or JS, whose JIT compilers don't perform nearly as well. Even Jython compiled to JVM bytecode and JITted with HotSpot is pretty slow.

However, LuaJIT does seem to be competitive with AOT-compiled C and with HotSpot, despite Lua being just as dynamic as Python and more so than JS.

Re:I built a hardware processor that runs Python by pjmlp on Monday April 28, 2025 @12:32PM (#43823282)
It is solved to the point the users on those communities are not writing extensions in C all the time, to compensate for the interpreter implementation.

AOT winning over JITs on micro benchmarks hardly wins in meaningful way for most business applications, especially when JIT caches and with PGO data sharing across runs is part of the picture.

Sure there are always going to be use cases that require AOT, and in most of them is due to deployment constraints, than anything else.

Most mainstream devs don't even know how to use PGO tooling correctly from their AOT toolchains.

Heck, how many Electron apps do you have running right now?

Re:I built a hardware processor that runs Python by dragonwriter on Monday April 28, 2025 @12:24PM (#43823202)
Python starting with 3.13 also has a JIT available.
Re:I built a hardware processor that runs Python by pjmlp on Monday April 28, 2025 @12:30PM (#43823258)
Kind of, you have to compile it yourself, and is rather basic, still early days.

PyPy and GraalPy is where the fun is, however they are largely ignored outside their language research communities.