AI-powered
podcast player
Listen to all your favourite podcasts with AI-powered features
How to Write a Program That Writes a Programmable Programmable Program
I think about this a lot in terms of making the abstraction free. Let's say I have some problem and I want to write some code that does something. And one way to implement my solution in code is to have a function that like reads that data and executes it. That's a nice way to write code, but it has a cost. You kind of reading and following the instructions live at runtime. It's actually you're spending computation on that. If you replace that with something that's staged, something that's kind of based on macros, you do that reading at compile time and just generate the kind of expanded version of the code.And so, you know, the performance improves