optimize front() for bust of data
azuresigma opened this issue · 1 comments
azuresigma commented
currently, front() always do head_.load(std::memory_order_acquire. I think it can load(std::memory_order_relaxed) first, then try to load(std::memory_order_acquire). This will help when producer has a lot of data coming in at the same time.
Facebook folly queue has a pull request for this. facebook/folly#1133. Not sure why it was not accepted into master.
rigtorp commented
Yes this is an interesting optimization.