The fastest way to do this is to not do it. Create a new collection class that will iterate over a range of integers, without storing a copy of each one.
class range {
private:
int low, high;
public:
range_iterator begin();
range_iterator end();
}