@@ -7,8 +7,8 @@ namespace ipxp::output {
77
88template <typename ElementType>
99class FFQ2OutputStorage : public FFQOutputStorage <ElementType> {
10- constexpr static uint32_t SHORT_TRIES = 5 ;
11- constexpr static uint32_t LONG_TRIES = 3 ;
10+ // constexpr static uint32_t SHORT_TRIES = 5;
11+ // constexpr static uint32_t LONG_TRIES = 3;
1212
1313public:
1414 explicit FFQ2OutputStorage (
@@ -30,6 +30,7 @@ class FFQ2OutputStorage : public FFQOutputStorage<ElementType> {
3030 BackoffScheme backoffScheme (70 , std::numeric_limits<std::size_t >::max ());
3131 const uint64_t writeRank = this ->m_writeRank ->fetch_add (1 , std::memory_order_acq_rel);
3232 const uint64_t writeIndex = remap (writeRank) % OutputStorage<ElementType>::STORAGE_CAPACITY;
33+ __builtin_prefetch (&this ->m_cells [writeIndex + 1 ], PrefetchMode::Write, Locality::High);
3334 while (!this ->m_cells [writeIndex].state .tryToSetWriter ()) {
3435 backoffScheme.backoff ();
3536 }
@@ -52,6 +53,7 @@ class FFQ2OutputStorage : public FFQOutputStorage<ElementType> {
5253 }
5354 const uint64_t readRank = this ->m_readRank ->fetch_add (1 , std::memory_order_acq_rel);
5455 const uint64_t readIndex = remap (readRank) % OutputStorage<ElementType>::STORAGE_CAPACITY;
56+ __builtin_prefetch (&this ->m_cells [readIndex + 1 ], PrefetchMode::Write, Locality::High);
5557 while (readRank >= this ->m_writeRank ->load (std::memory_order_acquire)
5658 && this ->writersPresent ()) {
5759 backoffScheme.backoff ();
0 commit comments