mirror of
https://github.com/boostorg/unordered.git
synced 2025-07-30 11:27:15 +02:00
re-strengthened atomic ops, halved gc frequency again
This commit is contained in:
@ -204,7 +204,7 @@ private:
|
|||||||
template<typename Integral>
|
template<typename Integral>
|
||||||
struct atomic_integral
|
struct atomic_integral
|
||||||
{
|
{
|
||||||
#if 0&&defined(BOOST_UNORDERED_LATCH_FREE)
|
#if defined(BOOST_UNORDERED_LATCH_FREE)
|
||||||
operator Integral()const{return n.load(std::memory_order_acquire);}
|
operator Integral()const{return n.load(std::memory_order_acquire);}
|
||||||
void operator=(Integral m){n.store(m,std::memory_order_release);}
|
void operator=(Integral m){n.store(m,std::memory_order_release);}
|
||||||
void operator|=(Integral m){n.fetch_or(m);}
|
void operator|=(Integral m){n.fetch_or(m);}
|
||||||
@ -571,7 +571,8 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::cout
|
std::cout
|
||||||
<<"version: 2024/01/03 17:45; "
|
<<"version: 2024/01/03 20:50; "
|
||||||
|
<<"lf: "<<(double)size()/capacity()<<"; "
|
||||||
<<"capacity: "<<capacity()<<"; "
|
<<"capacity: "<<capacity()<<"; "
|
||||||
<<"rehashes: "<<rehashes<<"; "
|
<<"rehashes: "<<rehashes<<"; "
|
||||||
<<"max probe:" <<max_probe<<"\n";
|
<<"max probe:" <<max_probe<<"\n";
|
||||||
@ -1308,8 +1309,8 @@ private:
|
|||||||
#if defined(BOOST_UNORDERED_LATCH_FREE)
|
#if defined(BOOST_UNORDERED_LATCH_FREE)
|
||||||
static bool is_occupied(group_type* pg,std::size_t pos)
|
static bool is_occupied(group_type* pg,std::size_t pos)
|
||||||
{
|
{
|
||||||
//return reinterpret_cast<std::atomic<unsigned char>*>(pg)[pos]>1;
|
return reinterpret_cast<std::atomic<unsigned char>*>(pg)[pos]>1;
|
||||||
return true;
|
//return true;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
static bool is_occupied(group_type* pg,std::size_t pos)
|
static bool is_occupied(group_type* pg,std::size_t pos)
|
||||||
@ -2005,7 +2006,7 @@ private:
|
|||||||
struct garbage_vector
|
struct garbage_vector
|
||||||
{
|
{
|
||||||
static constexpr std::size_t N=256;
|
static constexpr std::size_t N=256;
|
||||||
static constexpr std::size_t min_for_epoch_bump=32;
|
static constexpr std::size_t min_for_epoch_bump=64;
|
||||||
|
|
||||||
using ssize_t=std::make_signed<std::size_t>::type;
|
using ssize_t=std::make_signed<std::size_t>::type;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user