Dominique Martinet asmadeus@codewreck.org wrote:
skip is modified in the first if so I don't see how the compiler could optimize it.
I mean that if you have:
if (skip < fsize) { ... } if (skip >= fsize) { ... }
then the compiler should be able to take the second check as true in the case where the first fails.
26923 1104 0 28027 6d7b a.o 27019 1104 0 28123 6ddb b.o
That's a surprisingly large change.
but honestly I'm happy to focus on readability here -- if you think two if are easier to read I'll be happy to send a v3
I must admit I dislike goto jumping *in* to a braced section. It's not even allowed in C++ and Java, IIRC.
David