Commit da736784 authored by Christoph Conrads's avatar Christoph Conrads

Add `std::ranlux48` to benchmark

parent 7881b64a
......@@ -58,6 +58,7 @@ std::string get_name(const dummy_engine&) { return "dummy-prng"; }
std::string get_name(const std::mt19937&) { return "std::mt19937"; }
std::string get_name(const std::mt19937_64&) { return "std::mt19937_64"; }
std::string get_name(const std::ranlux24&) { return "std::ranlux24"; }
std::string get_name(const std::ranlux48&) { return "std::ranlux48"; }
std::string get_name(const ranlux_tools::xoshiro128plus&)
{
......@@ -124,6 +125,7 @@ void run(std::uintmax_t num_draws)
auto w =
Generator::max() == std::numeric_limits<std::uint64_t>::max() ? 8u :
Generator::max() == (1ull<<48) - 1u ? 6u :
Generator::max() == std::numeric_limits<std::uint32_t>::max() ? 4u :
Generator::max() == (1u<<24) - 1u ? 3u :
Generator::max() == std::numeric_limits<std::uint16_t>::max() ? 2u :
......@@ -144,7 +146,7 @@ void run(std::uintmax_t num_draws)
auto dummy = std::uint16_t(gen());
std::printf(
"%-25s | %10ju | %20.2e | %hu\n",
"%-25s | %10ju | %20.2e | %hu\n",
name.c_str(), t_msec, bytes_per_msec, dummy
);
}
......@@ -155,7 +157,7 @@ int main()
constexpr auto num_draws = std::uintmax_t{1000} * 1000u * 1000u;
std::printf(
"%-28s | %10s | %20s | %s\n",
"%-25s | %10s | %20s | %s\n",
"generator", "time(sec)", "throughput(byte/sec)", "dummy"
);
......@@ -178,6 +180,7 @@ int main()
run<rlxt::ranlux64>(num_draws);
#endif
run<std::ranlux24>(num_draws);
run<std::ranlux48>(num_draws);
run<std::mt19937>(num_draws);
run<std::mt19937_64>(num_draws);
run<rlxt::xoshiro128plus>(num_draws);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment