logoalt Hacker News

written-beyondtoday at 1:36 PM1 replyview on HN

THAT'S INSANE!

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.


Replies

Saloctoday at 8:28 PM

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.