News for hackers. Stuff that matters.
Re:Python 3.13 Gets a JIT by bonzini on Tuesday January 09, 2024 @02:20PM (#38930587)
Copy and patch is a variant of QEMU's original "dyngen" backend by Fabrice Bellard[1][2], with more help from the compiler to avoid the maintainability issues that ultimately led QEMU to use a custom code generator.

[1] https://www.usenix.org/legacy/event/usenix05/tech/freenix/fu...

[2] https://review.gerrithub.io/plugins/gitiles/spdk/qemu/+/5a24...

Re:Python 3.13 Gets a JIT by twbarr on Tuesday January 09, 2024 @02:46PM (#38930994)
Ultimately, most good ideas were first implemented by Fabrice Bellard.
Re:Python 3.13 Gets a JIT by darknavi on Tuesday January 09, 2024 @04:19PM (#38932243)
I am happy to see him working on QuickJS in the last month or so. It could really use some ES2023 love!
Re:Python 3.13 Gets a JIT by KRAKRISMOTT on Tuesday January 09, 2024 @04:12PM (#38932169)
Copy and patch goes all the way back to Grace Hopper's original compiler implementation
Re:Python 3.13 Gets a JIT by lifthrasiir on Wednesday January 10, 2024 @12:49AM (#38936689)
They were called "template-based" JIT and copy-and-patch approach is not new in this regard. The novel idea of copy-and-patch JIT was an automatic code generation via relocatable objects. (By the way, QEMU is indeed cited as an inspiration for copy-and-patch JIT.)
Re:Python 3.13 Gets a JIT by fuzztester on Tuesday January 09, 2024 @11:52PM (#38936345)
Heard of him; he's done a lot of stuff. So is he the Bourbaki of software?

https://en.m.wikipedia.org/wiki/Nicolas_Bourbaki

Re:Python 3.13 Gets a JIT by vanderZwan on Wednesday January 10, 2024 @10:01AM (#38939600)
While I'm sure some people theorize that Fabrice Bellard is actually a pseudonym of a collective of 10x programmers, he is as far as I know just one person.
Re:Python 3.13 Gets a JIT by fuzztester on Wednesday January 10, 2024 @01:49PM (#38941778)
He he, I forgot to add a wink at the end of my question above.
Re:Python 3.13 Gets a JIT by monocasa on Wednesday January 10, 2024 @12:40PM (#38941043)
Which itself is how I understand the compilation step of quaject code in the synthesis kernel to have worked. Ie. do constant propagation and dead code elimination on the input format, and use a simple template driven backend to dump out native machine code.

In fact I wouldn't be surprised if the earliest compilers were template based, as that's about the only implementation that would fit in a RAM as a compiler pass.