6 ms·
You could rewrite it to int* ptr = ((v != 0) * lwr) + ((v == 0) * rwr); I doubt it would be faster than the ternary though.
by misev 2mo ago
You could rewrite it to
int* ptr = ((v != 0) * lwr) + ((v == 0) * rwr);
I doubt it would be faster than the ternary though.