• ramius345@sh.itjust.works
    link
    fedilink
    arrow-up
    20
    arrow-down
    1
    ·
    10 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
      3
      ·
      10 months ago

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