Есть ли у C#
мира эквивалент __builtin_expect
?
if (__builtin_expect(is_xyz, true)) // <---- do we have that (or an alternative to it)?
{
// ...
}
or
if (likely(is_xyz)) // <---- do we have that (or an alternative to it)?
{
// ...
}
Примечание
Если вы не знакомы с __builtin_expect
.
- что делает
__builtin_expect
: В чем преимущество __builtin_expect GCC в операторах if else? - документ: https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html