Speeup from 15  sek to 9 sek (complete unopt.was 35 sek) by replacing std::set with random access set