Loading…
Automatic, template-based run-time specialization: implementation and experimental study
Specializing programs with respect to run time values has been shown to drastically improve code performance on realistic programs ranging from operating systems to graphics. Recently, various approaches to specializing code at run time have been proposed. However, these approaches still suffer from...
Saved in:
Main Authors: | , , , |
---|---|
Format: | Conference Proceeding |
Language: | English |
Subjects: | |
Online Access: | Request full text |
Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
Summary: | Specializing programs with respect to run time values has been shown to drastically improve code performance on realistic programs ranging from operating systems to graphics. Recently, various approaches to specializing code at run time have been proposed. However, these approaches still suffer from shortcomings that limit their applicability: they are manual, too expensive, or require programs to be written in a dedicated language. We solve these problems by introducing new techniques to implement run time specialization. The key to our approach is the use of code templates. Templates are automatically generated from ordinary programs and are optimized before run time, allowing high quality code to be quickly generated at run time. Experimental results obtained on scientific and graphics code indicate that our approach is highly effective. Little run time overhead is introduced, since code generation primarily consists of copying instructions. Run time specialized programs run up to 10 times faster, and are nearly as fast as fully optimized programs (80% on average). The combination of low run time overhead and high code quality enables specialization to be amortized in as few as 3 runs. Although this approach is highly effective, its implementation is relatively simple since it exploits existing partial evaluation and compiler technologies. |
---|---|
ISSN: | 1074-8970 2374-8583 |
DOI: | 10.1109/ICCL.1998.674164 |