Some minor improvements. Bottleneck is still the calls to std::erase(std::remove()). With number_list.size() = 1000 the number of calls to said function is about 13,000, with number_list.size() = 10000 the number of calls is almost 360,000. Pathetically hackish.