Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

As I pointed out in another comment, the equivalence is really just about the fact that SSA, CPS, and ANF all name each intermediate value once and avoid mutation. The rest is implementation details.

That's certainly true of "every one of the dozens of passes made basically an entire copy of it" - that's just a choice of how to implement it, which is an obvious choice if one is coming at it from a functional angle.

These kinds of approaches aren't always as inefficient as one might naively imagine, because there are usually tradeoffs involved - look at Haskell for example, which is capable of producing very performant code despite being largely purely functional. Often, the performance is gained because of the purely functional source code allowing for optimizations during compilation, like stream fusion and so on.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: