From c7e5b6814420f0de715ba684557bc624b0e0b6ed Mon Sep 17 00:00:00 2001 From: EntireTwix Date: Tue, 6 Jul 2021 15:13:58 -0700 Subject: [PATCH] :zap: added hashing to benchmark --- benchmarking.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/benchmarking.cpp b/benchmarking.cpp index b692a44..35e8922 100644 --- a/benchmarking.cpp +++ b/benchmarking.cpp @@ -4,6 +4,7 @@ #include #include #include +#include "xxhash_str.h" #include "bank.h" #include @@ -67,8 +68,9 @@ int main(int argc, char **argv) bank.AddUser("jolly", 0, "root"); bank.admin_account = "twix"; - Op(std::hash{}("twix is pog champ :flushed:"), "std::hash ", 100000); - Op(xxHashStringGen{}("twix is pog champ :flushed:", 27), "xxHashStringGen ", 100000); + std::string data("twix is pog champ :flushed:"); + Op(std::hash{}(data), "std::hash ", 100000); + Op(xxHashStringGen{}(data), "xxHashStringGen ", 100000); Op_a(bank.AddUser("", 0, ""), "add user: ", 100000, bank.DelUser("")); Op(bank.ImpactBal("twix", 1), "impact bal: ", 100000);