Methods of optimization/improvement of programs, during times, have been an interesting topic in the intersection of theoretical computer science and software engineering. The research in this field requires knowledge of semantics of programs (computer science) as well as understanding of software properties and expertise in software development (software engineering). In the early days of computing, both memory usage and processing time were optimized. Computers have large memories at present, and memory optimization is performed only for registers, the main attention is paid at the improvement of speed of computations. A new field of research has emerged due to development and practical application of automatic program synthesis: automatic improvement (optimization) of automatically synthesized programs. Additional information is available in this case: the class of programs (narrower than all programs accepted by the language) is determined by the synthesis algorithms. Information about structure of programs and restrictions on usage of types can be used by optimization methods. It is expected that partial evaluation could be a good basis for optimization.