C++2a synchronisation inefficient in GCC 11
Thomas Rodgers
trodgers@redhat.com
Mon Mar 1 18:34:22 GMT 2021
----- Original Message -----
> On Monday, 1 March 2021 09:46:08 PST Thomas Rodgers wrote:
> > I discussed the prematureness of the contention optimization with ogiroux
> > this morning. Confirming, libc++ does do this, and in his measurements it
> > saves on the order of 50us.
> >
> > Regarding the use of _Hash_impl::hash(), that can be changed to just use
> > the
> > pointer value itself. This is what libatomic does. I'm happy to propose
> > that as a subsequent patch to the most recent version of this code which I
> > submitted recently.
>
> Is the benchmark source somewhere I can take a look at?
>
I'd have to ask Olivier.
> I'm worried that it is benchmarking the wrong thing. Can we benchmark latch
> and counting_semaphore instead? Those already track contention on the
> waitable
> atomic by themselves.
>
So is your concern here that e.g. latch::count_down() will do an extra atomic load?
> --
> Thiago Macieira - thiago.macieira (AT) intel.com
> Software Architect - Intel DPG Cloud Engineering
>
>
>
>
More information about the Libstdc++
mailing list