Gollum@feddit.de to Programmer Humor@programming.dev · 9 months agoPOV: Working at Googlefeddit.deimagemessage-square14fedilinkarrow-up1612arrow-down121
arrow-up1591arrow-down1imagePOV: Working at Googlefeddit.deGollum@feddit.de to Programmer Humor@programming.dev · 9 months agomessage-square14fedilink
minus-squareramius345@sh.itjust.workslinkfedilinkarrow-up19arrow-down1·9 months agoDon’t need an if, just set the variable and collect the data. Saved you a jump instruction. The compiler is going to optimize it out anyway, but simpler code is better and some people forget the -O flag.
minus-squareSibbo@sopuli.xyzlinkfedilinkarrow-up2·9 months agoYeah but the last requires you to explicitly distinguish between the two cases.
Don’t need an if, just set the variable and collect the data. Saved you a jump instruction. The compiler is going to optimize it out anyway, but simpler code is better and some people forget the -O flag.
Yeah but the last requires you to explicitly distinguish between the two cases.