A
Anthony Shaw
tonybaloney.github.io · Personal blog · on HN since 2020
Anthony Shaw writes about Python internals, performance, the JIT compiler, sub-interpreters and running Python alongside .NET.
What HN saysHN commenters link his post on the Python 3.13 JIT as a clear explanation of the copy-and-patch approach, and his CSnakes project for embedding Python in .NET.
17HN people shared it
5linked it in comments
13stories submitted
1.5Kstory points
5 months agolast shared
2020people per year2026
Most-shared posts
- 1Python 3.13 Gets a JIT5 people · 1.1K points · first shared 2024 · 521 comments on HN
- 2Running Python Parallel Applications with Sub Interpreters3 people · 4 points · first shared 2023 · 1 comments on HN
- 3Running Python on .NET 52 people · 7 points · first shared 2020 · discussion on HN
- 4CSnakes2 people · first shared 2024
- 5Python has had async for 10 years – why isn't it more popular?1 people · 324 points · first shared 2025 · 295 comments on HN
- 6Writing Python Extensions in Assembly1 people · 98 points · first shared 2021 · 24 comments on HN
- 7Using the Python Match Statement1 people · 3 points · first shared 2025 · discussion on HN
- 8XSS Exploitation in Django Applications1 people · 2 points · first shared 2020 · discussion on HN
- 9Django on Azure – beyond “hello world”1 people · 2 points · first shared 2021 · discussion on HN
- 10PyPy in Production – TonyBaloney1 people · 2 points · first shared 2022 · discussion on HN
- 11Getting started1 people · first shared 2025
What HN people wrote when they linked it
jongalloway2 · 2025-06-26
CSnakes integrates Python into .NET apps - https://tonybaloney.github.io/CSnakes/
https://www.youtube.com/watch?v=DqoxHNH9Iwo shows adding an LLM
There are several ways to manage migrations depending on the team structure and dev practices: SQL scripts, command line, bundles (single-file executables), and in-app. The team recommends SQL scripts since they can be reviewed, tuned, and managed by a DBA but take your pick. https://learn.microsoft.com/ef/core/managing-schemas/migrations/applyi…
zbentley · 2024-04-11
> There is so much pointer indirection internal to CPython.
This cannot be overstated. Really, truly, forget everything you know about cache locality when doing even basic "for-each: add numbers together"-type things in Python.
That's not an indictment; such indirection is par for the course for scripting languages, and enables a lot of features and dynamism. Additionally, the cost of that indirection may go down over time thanks to interpreter optimizations like the JIT: https://tonybaloney.github.io/posts/python-gets-a-jit.html
ngrilly · 2024-01-11
It was a very interesting read, in the context of Python getting a copy-and-patch JIT compiler in the upcoming 3.13 release [1], to understand better the approach.
[1] https://tonybaloney.github.io/posts/python-gets-a-jit.html
aksss · 2024-09-25
Plug for csnakes.. https://tonybaloney.github.io/CSnakes/
btown · 2024-09-06
A decade ago, https://pycpu.wordpress.com/ was a prototype that turned a small subset of Python bytecode, as well as the specifications for a system to run it, into VHDL/Verilog (via myhdl.org) to run on an FPGA. In theory, I imagine it would be possible to take this approach and transpile something like https://doc.pypy.org/en/latest/interpreter.html to an HDL.
But a more reasonable thing to do would be to look down the road that JIT's and other similar technologies are coming to mainline CPython, see e.g. https://tonybaloney.github.io/posts/python-gets-a-jit.html - and thus it might make sense to have some of the unique semantics of Python opcodes be adopted by specifications like ARM, similar to how ARM created the FJCVTZS opcode to exactly match Javascript's ToInt32 specification:
https://stackoverflow.com/questions/50966676/why-do-arm-chips-have-an-… -> https://tc39.es/ecma262/#sec-toint32