Fix formatting.
This commit is contained in:
parent
a11d37dd4c
commit
512c0cd3c2
@ -7,6 +7,7 @@
|
|||||||
#include "td/utils/FlatHashMap.h"
|
#include "td/utils/FlatHashMap.h"
|
||||||
|
|
||||||
#include <absl/container/flat_hash_map.h>
|
#include <absl/container/flat_hash_map.h>
|
||||||
|
#include <array>
|
||||||
#include <folly/container/F14Map.h>
|
#include <folly/container/F14Map.h>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
@ -14,7 +14,6 @@
|
|||||||
#include <initializer_list>
|
#include <initializer_list>
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
#include <new>
|
#include <new>
|
||||||
#include <unordered_map>
|
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
namespace td {
|
namespace td {
|
||||||
@ -585,10 +584,8 @@ using FlatHashSetImpl = FlatHashTable<SetNode<KeyT>, HashT, EqT>;
|
|||||||
|
|
||||||
template <class KeyT, class ValueT, class HashT = std::hash<KeyT>, class EqT = std::equal_to<KeyT>>
|
template <class KeyT, class ValueT, class HashT = std::hash<KeyT>, class EqT = std::equal_to<KeyT>>
|
||||||
using FlatHashMap = FlatHashMapImpl<KeyT, ValueT, HashT, EqT>;
|
using FlatHashMap = FlatHashMapImpl<KeyT, ValueT, HashT, EqT>;
|
||||||
//using FlatHashMap = std::unordered_map<KeyT, ValueT, HashT, EqT>;
|
|
||||||
|
|
||||||
template <class KeyT, class HashT = std::hash<KeyT>, class EqT = std::equal_to<KeyT>>
|
template <class KeyT, class HashT = std::hash<KeyT>, class EqT = std::equal_to<KeyT>>
|
||||||
using FlatHashSet = FlatHashSetImpl<KeyT, HashT, EqT>;
|
using FlatHashSet = FlatHashSetImpl<KeyT, HashT, EqT>;
|
||||||
//using FlatHashSet = std::unordered_set<KeyT, HashT, EqT>;
|
|
||||||
|
|
||||||
} // namespace td
|
} // namespace td
|
||||||
|
@ -383,7 +383,10 @@ static void BM_remove_if_slow(benchmark::State &state) {
|
|||||||
auto first_key = table.begin()->first;
|
auto first_key = table.begin()->first;
|
||||||
{
|
{
|
||||||
size_t cnt = 0;
|
size_t cnt = 0;
|
||||||
td::table_remove_if(table, [&cnt](auto &) { cnt += 2; return cnt <= N; });
|
td::table_remove_if(table, [&cnt](auto &) {
|
||||||
|
cnt += 2;
|
||||||
|
return cnt <= N;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
while (state.KeepRunningBatch(BATCH_SIZE)) {
|
while (state.KeepRunningBatch(BATCH_SIZE)) {
|
||||||
for (size_t i = 0; i < BATCH_SIZE; i++) {
|
for (size_t i = 0; i < BATCH_SIZE; i++) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user