Compare commits

...

4 Commits

Author SHA1 Message Date
Valentin Balaschenko
6c80a59364 all hw threads 2025-06-02 19:20:45 +01:00
Valentin Balaschenko
393dd1e27d half of hw threads 2025-06-02 19:20:13 +01:00
Valentin Balaschenko
c1713b8773 only half of hw threads 2025-05-21 14:51:30 +01:00
Valentin Balaschenko
c6c20ca671 only half of hw threads 2025-05-21 14:42:50 +01:00

View File

@@ -253,11 +253,12 @@ public:
partitioned_unordered_map(
std::optional<std::size_t> partitions = std::nullopt)
{
// Set partitions to the number of hardware threads if the parameter
// is either empty or set to 0.
partitions_ = partitions && *partitions
? *partitions
: std::thread::hardware_concurrency();
// Set partitions to use half of the number of hardware threads if the
// parameter is either empty or set to 0.
partitions_ = std::size_t{std::thread::hardware_concurrency()};
// partitions && *partitions
// ? *partitions
// : std::size_t{std::thread::hardware_concurrency() / 2};
map_.resize(partitions_);
XRPL_ASSERT(
partitions_,