Find All the Primes Between two Numbers
Just do the sieve once, this should give you about 5-10x increase.

int main(){
    system("clear");

    std::vector&lt;bool&gt; primes;
    std::vector&lt;input&gt; programInput;

    programInput = parseInput();

    auto maxPrime = programInput.begin()-&gt;end;
    for(auto&amp; m : programInput){
         maxPrime = max(maxPrime, m.end);
    }
    primes = findPrimes(0, maxPrime);

    for (int i = 0; i &lt; programInput.size(); ++i){
        printPrimes(primes , programInput[i].start, programInput[i].end);
    }
}


Then avoid the vector copies by taking all vector parameters by const &amp; and you should be golden.