Computer scientists at MIT have developed a program called Helium that can automatically revamp and fine-tune old code, without needing the original source, in a matter of hours or even minutes.
V. Sundaresan, D. Maier, P. Ramarao, and M. Stoodley. Proceedings of the International Symposium on Code Generation and Optimization, page 87--97. Washington, DC, USA, IEEE Computer Society, (2006)