#include "lfhmap.hpp" #include #include #include int main() { size_t v = 13; auto map = new mct20::lfhmap(); for(int a = 0; a < 250000; a++) { map->set(v, v); const size_t& t = map->get(v).value(); if(t != v) return 1; v*=121; v+=17; } v = 13; auto start = std::chrono::high_resolution_clock::now(); for(int a = 0; a < 250000; a++) { const size_t& t = map->get(v).value(); if(t != v) return 1; v*=121; v+=17; } auto time = std::chrono::high_resolution_clock::now() - start; std::cout << "Test 03 took " << std::chrono::duration_cast(time).count() << "ms" << std::endl; std::cout << "Per 1R " << std::chrono::duration_cast(time).count()/250000 << "ns" << std::endl; return 0; }