News for hackers. Stuff that matters.
Re:Ask HN: What is it about compiling that is so time-consum... by retrac on Monday January 30, 2023 @05:54PM (#34587798)
> NP-hard

I wrote a toy compiler once as an educational project. I accidentally invented super-optimization, too. Felt so clever for a whole hour or so. It was guaranteed to produce the optimal program that can be represented in the intermediate representation I used. Unfortunately, this only works for programs with up to six operations with current hardware; more than about ten would require more RAM than can fit in the universe.

Finding shortcuts to prune down that problem is the black art of practical optimization.

There are no comments on this comment yet.