diff --git a/Makefile b/Makefile index 7c02f1e..68d2394 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,8 @@ +CXX=g++ +CXXFLAGS=-Wall -Wextra -O3 benchmark: benchmark.cpp - g++ -Wall -Wextra -o benchmark benchmark.cpp + $(CXX) $(CXXFLAGS) -o benchmark benchmark.cpp clean: rm -rf benchmark diff --git a/benchmark.cpp b/benchmark.cpp index b93ca17..7577530 100644 --- a/benchmark.cpp +++ b/benchmark.cpp @@ -1,3 +1,5 @@ +// Initially generated by AI (Google Gemini) + #include #include #include @@ -10,7 +12,7 @@ using namespace std::chrono; -typedef std::chrono::time_point time_p; +typedef time_point time_p; // Configuration const int NUM_ELEMENTS = 1000000; @@ -50,7 +52,7 @@ void print_row(const std::string& label, double hm_ms, double std_ms) uint64_t hash_str(const void *buffer, size_t size) { (void)size; - const char *str = reinterpret_cast(buffer); + const char *str = reinterpret_cast(buffer); uint64_t hash = (uint64_t)str; return hash; }