A short post on how variable names can leak out of macros if there is a name collision with a constant. I thought this was a delightful read!

  • arendjr@programming.dev
    link
    fedilink
    arrow-up
    1
    ·
    2 months ago

    Runtime performance is entirely unaffected by the use of macros. It can have a negative impact on compile-time performance though, if you overdo it.

    • livingcoder@programming.dev
      link
      fedilink
      arrow-up
      2
      ·
      2 months ago

      I understand that the macro only affects compile time but I’m talking about the extra function that’s included in the resulting source code when the macro is expanded during compile. Based on other feedback, it looks like the unused function is optimized away.