minor changes
This commit is contained in:
parent
6c9f7f7c49
commit
f1868ceea5
|
@ -40,7 +40,6 @@ private:
|
||||||
void populate_cache() {
|
void populate_cache() {
|
||||||
populate_cache_dir(file_dir);
|
populate_cache_dir(file_dir);
|
||||||
populate_cache_dir("./error_pages/");
|
populate_cache_dir("./error_pages/");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -1,3 +1,13 @@
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* smart_map.cpp
|
||||||
|
* -------------
|
||||||
|
* Class that wraps unordered_map. Chooses whether to do O(1) hash lookup
|
||||||
|
* or O(N) linear lookup based on benchmark. This is done as O(smallN) can
|
||||||
|
* be faster than O(1)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
@ -6,7 +16,7 @@
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <bits/stdc++.h>
|
#include <bits/stdc++.h>
|
||||||
|
|
||||||
constexpr int benchmark_loops = 1000000;
|
constexpr int benchmark_loops = 100;
|
||||||
|
|
||||||
template <typename KeyType, typename ValueType>
|
template <typename KeyType, typename ValueType>
|
||||||
class smart_map {
|
class smart_map {
|
||||||
|
|
Loading…
Reference in a new issue