4 ms·
I think putting the memchr() in the same if would cause unnecessary calling of the memch() function (and scanning of 2000 bytes) even when any of the other cond
by tonmoy 9y ago
I think putting the memchr() in the same if would cause unnecessary calling of the memch() function (and scanning of 2000 bytes) even when any of the other conditions is false! It will work great on a language like ruby, not C.
- userbinator 9y agoC && is short-circuit-evaluated. Something like 'if (y && (k = x/y))' won't crash if y is 0.