[RFC][BZ #16549, #16410] Remove pthread_(cond)wait assembly implementations?
Brooks Moses
bmoses@google.com
Tue Feb 11 22:56:00 GMT 2014
On 02/11/2014 10:16 AM, Roland McGrath wrote:
>> Is there any record of this having been measured at the time they were
>> added? I don't have any evidence to refute the claim that the asm
>> performed measurably better, but I also find it a bit doubtful.
>
> I'm sure that it was measured informally. But I'm also sure that there are
> no useful records to be had. pthread_cond_{timed,}wait are unlike most
> others in that they are not (in sensible programs) called at all for
> uncontended cases, so it's almost certain that (modulo quick races) they
> will be making the system call. So indeed it is hard to see how this case
> could matter. But we still must be circumspect and give the benefit of the
> doubt that the decisions made in the past had merit and should not be
> dismissed out of hand.
I would note that, if we expect our future selves to respect the merit of
our current decisions of this nature, we should provide them with reasonable
documentation of why we made them. We obviously can't go and change the
past, but IMO if we do find that these perform measurably better now, we
should document that measurement by adding a comment on the code.
- Brooks
More information about the Libc-alpha
mailing list