From f1868ceea561187d873999da4ed76710ce960686 Mon Sep 17 00:00:00 2001 From: Nicholas Orlowsky Date: Wed, 18 Oct 2023 14:17:44 -0400 Subject: [PATCH] minor changes --- src/backends/file_backend.cpp | 1 - src/datastructures/smart_map.cpp | 12 +++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/backends/file_backend.cpp b/src/backends/file_backend.cpp index 3e5631f..aae1e6e 100644 --- a/src/backends/file_backend.cpp +++ b/src/backends/file_backend.cpp @@ -40,7 +40,6 @@ private: void populate_cache() { populate_cache_dir(file_dir); populate_cache_dir("./error_pages/"); - } public: diff --git a/src/datastructures/smart_map.cpp b/src/datastructures/smart_map.cpp index 0e19134..0ea1c55 100644 --- a/src/datastructures/smart_map.cpp +++ b/src/datastructures/smart_map.cpp @@ -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 #include #include @@ -6,7 +16,7 @@ #include #include -constexpr int benchmark_loops = 1000000; +constexpr int benchmark_loops = 100; template class smart_map {