A. Gill, “A novel approach towards peephole optimisations,” in Proceedings of the 1991 Glasgow Workshop on Functional Programming (R. Heldal, C. K. Holst, and P. Wadler, eds.), Workshops in Computing, pp. 100–111, Springer, August 1991.


In this paper we examine alternative approaches towards the traditional optimisation technique of peepholing. Three simple methods of generating quality code are given. The first method improves poor juxtapositions while generating code, the second is an alternative usage of a solution to the knapsack problem. A third hybrid algorithm combines the strong points of both these solutions, and is presented as an alternative to conventional peepholing.


  author = {Andrew Gill},
  title = {A Novel Approach Towards Peephole Optimisations},
  booktitle = {Proceedings of the 1991 Glasgow Workshop on Functional Programming},
  year = {1991},
  month = {August},
  pages = {100--111},
  editor = {Rogardt Heldal and
               Carsten Kehler Holst and
               Philip Wadler},
  publisher = {Springer},
  series = {Workshops in Computing},
  isbn = {3-540-19760-5},