4 ms·
Yes, that is another way, but it involves setting a value and another test for it. This is in the context of an extremely fast algorithm and the overhead here
by MattPalmer1086 4y ago
Yes, that is another way, but it involves setting a value and another test for it. This is in the context of an extremely fast algorithm and the overhead here is not acceptable.
It does not always hurt to use goto to implement the correct control flow when required.Arguably, the code is clearer as well.
EDIT: I'd prefer to actually have a while else construct though!