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
    ·
    8 hours 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
      1
      ·
      2 hours 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.