Tools made in assistance of the Metacall Project
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 line
447 B

  1. #include "lfhmap.hpp"
  2. #include <string>
  3. #include <iostream>
  4. int main() {
  5. size_t v = 13;
  6. auto map = new mct20::lfhmap<size_t, std::string, 80000>();
  7. for(int a = 0; a < 250000; a++) {
  8. //if(a % 1000 == 0) std::cout << a << std::endl;
  9. map->set(v, std::to_string(v));
  10. if(auto acc = map->get(v); acc) {
  11. const std::string& t = acc.value();
  12. if(t != std::to_string(v))
  13. return 1;
  14. } else
  15. return 1;
  16. v*=121;
  17. v+=17;
  18. }
  19. return 0;
  20. }