According to the documentation I found in the internet std::remove does something like the previous implementation (which was slow). If there are many occurences of identical elements the new implementation omits copying vector elements many times. The current code has nearly the same semantic like std::remove_copy except that the vector tmp_pnt_vec is not initialized/constructed with a size. I will change this and use std::remove_copy.