• ramius345@sh.itjust.works
    link
    fedilink
    arrow-up
    19
    arrow-down
    1
    ·
    9 months ago

    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.

    • Sibbo@sopuli.xyz
      link
      fedilink
      arrow-up
      2
      ·
      9 months ago

      Yeah but the last requires you to explicitly distinguish between the two cases.