mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 21:10:12 +01:00
Make more use of llvm STLExtras (#4668)
This is essentially the result of looking at `.begin()` uses. We also frequently do `std::shuffle`, but unfortunately STLExtras doesn't provide a wrapper for that.
This commit is contained in:
@@ -349,10 +349,10 @@ auto DumpHashStatistics(llvm::ArrayRef<T> keys) -> void {
|
||||
grouped_key_indices[hash_index].push_back(i);
|
||||
}
|
||||
ssize_t max_group_index =
|
||||
std::max_element(grouped_key_indices.begin(), grouped_key_indices.end(),
|
||||
[](const auto& lhs, const auto& rhs) {
|
||||
return lhs.size() < rhs.size();
|
||||
}) -
|
||||
llvm::max_element(grouped_key_indices,
|
||||
[](const auto& lhs, const auto& rhs) {
|
||||
return lhs.size() < rhs.size();
|
||||
}) -
|
||||
grouped_key_indices.begin();
|
||||
|
||||
// If the max number of collisions on the index is less than or equal to the
|
||||
|
||||
Reference in New Issue
Block a user