Hashtable.h
header only c++ lib provides a hash table class.
According to task Hashtable
is open addressing table (only uses new
for relocating buffer).
Hashtable
is a template class, has four template parameters:
KeyType
. Type of table's keyValueType
. Type of table's valueHasherType
. Type that implements thestd::hash<KeyType>
(HasherType
by default) interfaceComparatorType
. Type that implements thestd::equal_to<KeyType>
(ComparatorType
by default) interface
Class almost implements std::unordered_map interface
Catch2 as test framework.
Clang's Source-based code coverage for coverage analysis.
ClangFormat and Yandex guidelines as linter. See .clang-format
for details.
There are some make
targets:
build
. Compile test runnerdist/run_tests
test
. Rundist/run_tests
lint
. Linthashtable.h
all
. Compile and rundist/run_tests
coverage
. Analyze test coverage. Generatesdist/result.html
and outputs coverage percentage
I use perf
and Brendan Gregg's Flame Graphs
You can find perf tests in perf
branch.