Prev Up
Go backward to Cross-Language Support
Go up to Language Support

Language Extensions to Aid Optimization

Project: Design a set of type/function qualifiers that would allow higher order optimizations

[Stepanov]

An example of such an optimization:
bool foo(vector<double>& v) {
        vector<double> u = v;
        return reduce(v.begin(), v.end()) == reduce(u.begin(), u.end());
}
This should be optimized to:
bool foo(vector<double>& v) { return true; }

 

Prev Up