Sam James <s...@gentoo.org> writes:

> [[PGP Signed Part:Undecided]]
>
> Sam James <s...@gentoo.org> writes:
>
>> Alexe Stefan <stefanalex...@gmail.com> writes:
>>
>>> Does enabling USE=valgrind impact runtime performance in any way?
>>
>> A very small amount because it adds a check at runtime for whether
>> the application is running under Valgrind. The compiler may be able
>> to optimise this a bit if it can determine it's unlikely (if the
>> Valgrind headers don't already do this, they should probably mark
>> them as cold functions).
>
> Sorry, I should say, they're hot functions but the if()s for them
> should be unlikely()'d.

Alexander Monakov reached out and pointed out this isn't right - they're
actually branchless and just encoded in nops, so there's really
essentially no runtime cost.


Attachment: signature.asc
Description: PGP signature

Reply via email to