Re:Show HN: Copy-and-patch compiler for hard real-time Python
by Saloc on Sunday February 15, 2026 @03:28PM
(#47027230)
Thanks for your comment, I'll give a full write up a try.
I think for deterministic control applications this concept has a sweet spot. While in conventional code the number of branch combinations can blow up easely, here you need to be able to guarantee worst case execution time which forces you anyway to be very carefull with branching.
On https://copapy.nonan.net/compiler.html is the how-it-works readme section extended with the generated machine code for stencils and a simple example.
Re:Show HN: Copy-and-patch compiler for hard real-time Python
by maleldil on Sunday February 15, 2026 @05:43PM
(#47028510)
Is this what you want? https://en.wikipedia.org/wiki/Profile-guided_optimization
I always wondered if this could be possible. Like you fuzz a program, map out each possible allocation and deallocation and optimize the code with those hot paths and some statistics.
Very interesting project, would love some sort of write up on it.