My first superoptimizer

Superoptimization is the concept of finding the absolute optimal code that has the same output as a given code snippet. It involves generating every possible permutation of code instructions and testing each program for equivalence to the original program. The computational complexity of this process is terrible, but it was possible on computers back in 1987, so it should be feasible with modern computers. The article describes building a toy superoptimizer using a made-up assembly language with a few instructions and an emulator that executes programs to test their equivalence. The author also discusses potential improvements, such as allowing for different start states and adding more instructions. The source code can be found on GitHub.

https://austinhenley.com/blog/superoptimizer.html

To top