From 0bcd46a485912791e672ba46b3099da9c151a8da Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sat, 3 Dec 2022 15:32:04 +0200 Subject: [PATCH] Use enwik8 instead of enwik9 in benchmarks under 32 bit --- benchmark/word_count.cpp | 8 ++++++++ benchmark/word_size.cpp | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/benchmark/word_count.cpp b/benchmark/word_count.cpp index 19c83ef5..812b3419 100644 --- a/benchmark/word_count.cpp +++ b/benchmark/word_count.cpp @@ -41,8 +41,16 @@ static std::vector words; static void init_words() { +#if SIZE_MAX > UINT32_MAX + char const* fn = "enwik9"; // http://mattmahoney.net/dc/textdata +#else + + char const* fn = "enwik8"; // ditto + +#endif + auto t1 = std::chrono::steady_clock::now(); std::ifstream is( fn ); diff --git a/benchmark/word_size.cpp b/benchmark/word_size.cpp index d518b70c..f7412192 100644 --- a/benchmark/word_size.cpp +++ b/benchmark/word_size.cpp @@ -39,8 +39,16 @@ static std::vector words; static void init_words() { +#if SIZE_MAX > UINT32_MAX + char const* fn = "enwik9"; // http://mattmahoney.net/dc/textdata +#else + + char const* fn = "enwik8"; // ditto + +#endif + auto t1 = std::chrono::steady_clock::now(); std::ifstream is( fn );