BigFile/Sasquatch #1

Merged
rboullard merged 100 commits from BigFile into Development 2026-09-01 16:32:02 +00:00
2 changed files with 12 additions and 7 deletions
Showing only changes of commit f518bf7c8a - Show all commits
+10 -6
View File
@@ -2,16 +2,20 @@
#include <ankerl/unordered_dense.h>
#include <benchmark/benchmark.h>
#include <effolkronium/random.hpp>
#include <algorithm>
#include <cstdint>
#include <random>
#include <type_traits>
#include <utility>
#include <vector>
namespace Bigfoot
{
namespace
{
using Random = effolkronium::random_static;
} // namespace
struct MyComplexStruct
{
std::uint32_t m_actualValueForBench = 0; // field summed by the Iterate benchmark
@@ -148,7 +152,7 @@ void Remove(benchmark::State& state)
ADAPTOR adaptor;
std::vector<typename ADAPTOR::Key> keys;
keys.reserve(count);
std::mt19937 rng(0x5EEDU);
Random::seed(0x5EEDU);
for (auto _: state)
{
@@ -159,7 +163,7 @@ void Remove(benchmark::State& state)
{
keys.push_back(adaptor.Add(MyComplexStruct {i}));
}
std::shuffle(keys.begin(), keys.end(), rng);
Random::shuffle(keys);
state.ResumeTiming();
for (const typename ADAPTOR::Key key: keys)
@@ -186,8 +190,8 @@ void Get(benchmark::State& state)
{
keys.push_back(adaptor.Add(MyComplexStruct {i}));
}
std::mt19937 rng(0x5EEDU);
std::shuffle(keys.begin(), keys.end(), rng);
Random::seed(0x5EEDU);
Random::shuffle(keys);
for (auto _: state)
{
+2 -1
View File
@@ -9,7 +9,8 @@ set(PublicDependencies
EAStdC::EAStdC
fmt::fmt
flatbuffers::flatbuffers
rapidhash::rapidhash)
rapidhash::rapidhash
effolkronium_random)
set(PrivateDependencies)
set(BigfootPublicDependencies)
set(BigfootPrivateDependencies)