Code specialization is a well-known technique used to produce more efficient code from a generic one. This technique is widely used, from high level languages to optimized libraries like FFTW. It works by substituting a formal input value by an effective value, and can be done either statically or dynamically. Static specialization makes use of data that is expected to be frequently used, whereas, dynamic specialization uses the actual values at run-time.
展开▼