$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Jan Hafer (jan.hafer_at_[hidden])
Date: 2020-04-02 16:43:36
Thanks for the fast reply.
On 01.04.20 16:08, degski wrote:
> On Wed, 1 Apr 2020 at 05:27, Jan Hafer via Boost <boost_at_[hidden]>
> wrote:
>
>> Dear Boost developer,
>> I found the circular buffer to be slower than std::queue for
>>
>
> These are different containers.
Yes, however I needed a queue and was interested in the performance
characteristics.
Apparently std::queue is slower on single-thread applications,
but faster for multiple threads. I could reproduce the results on my own
circular buffer implementation.
>
> multithreading except in the case of a single thread (where it is
>> notably faster).
>>
>
> std::queue is not synchronized.
Yes, I do use 1 buffer/queue per thread.
>
> I am using resize() to have the expected size filled as in vector.
>>
>> Is this behavior expected or documented anywhere?
>> What kind of speedup is to be expected against the std::queue
>> implementation?
>> If there is none, then what is the purpose of circular buffer?
>>
>
> You could read the relevant docs. I strongly doubt that this boost
> container is slower than anything in the STL when compared like for like.
True, could reproduce.
>
> I do also have broken code on a multithreaded application that worked
>> fine before. I do pass the circular buffer as reference via functions
>> from file scope, which in combination with the threads (initially
>> starting elsewhere) somehow broke the code.
>>
>> Do you do regular benchmarks against other implementations? I dont see
>> linked graphs on your homepage.
I would like to see the benchmark results against std-implementations
linked on the main page.
If possible, also as simple comparison per thread count.