November 24th, 2008

gabe, frustration

Important safety tip

After pulling my hair out all day trying to figure out why important code suddenly got 10-20% slower, I noticed a parenthetical aside in the gcc documentation that casually mentioned that functions won't get inlined when they are used before they are defined, even if they are inlined explicitly. Which means that stuffing all your tiny static inline utility functions at the end of the file is great for readability but sucks for performance. Awesome. Oh, and "-Winline" won't mention this either. Thanks, gcc!
  • Current Mood
    frustrated frustrated