Don't call std::sort on sorted vector

std::set is already kept in sorted order.
This commit is contained in:
Max Bernstein 2023-02-23 16:28:07 -05:00
parent 5e15d526a0
commit fc9f9cbd8b

View File

@ -30,7 +30,6 @@ namespace pkpy{
}
float find_hit_score = indices.size() / (float)keys.size();
std::vector<uint32_t> indices_vec(indices.begin(), indices.end());
std::sort(indices_vec.begin(), indices_vec.end());
float find_miss_score = indices.size();
for(int j=1; j<indices_vec.size(); j++){
int gap = indices_vec[j] - indices_vec[j-1];