0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-02 18:18:56 +02:00

ircd::ctx: Eliminate branch in prof::mark() stack.

This commit is contained in:
Jason Volk 2020-08-02 06:42:04 -07:00
parent ea039f29b5
commit 1a433f7274

View file

@ -1629,8 +1629,15 @@ noexcept
_total.event[uint8_t(e)]++;
// Increment the ticker for the context's instance
if(likely(current))
current->profile.event[uint8_t(e)]++;
static uint64_t dummy;
uint64_t &ticker
{
current?
current->profile.event[uint8_t(e)]:
dummy
};
++ticker;
}
void