<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Inline on GanniPiece Blog</title>
    <link>https://blog.gannipiece.tw/en/tags/inline/</link>
    <description>Recent content in Inline on GanniPiece Blog</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Sat, 08 Oct 2022 16:06:04 +0000</lastBuildDate>
    <atom:link href="https://blog.gannipiece.tw/en/tags/inline/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Code Expansion: Macro vs Inline Function</title>
      <link>https://blog.gannipiece.tw/en/posts/macro-vs-inline-function/</link>
      <pubDate>Sat, 08 Oct 2022 16:06:04 +0000</pubDate>
      <guid>https://blog.gannipiece.tw/en/posts/macro-vs-inline-function/</guid>
      <description>&lt;p&gt;&lt;em&gt;(the post is automatically translated by AI)&lt;/em&gt;&lt;/p&gt;
&lt;h2 id=&#34;introduction&#34;&gt;Introduction&lt;/h2&gt;
&lt;p&gt;Macros and inline functions are two techniques for code reuse and expansion. Unlike regular function calls, both avoid the overhead of subroutine push/pop operations at runtime, which can speed up execution.&lt;/p&gt;
&lt;p&gt;The key difference between them is &lt;strong&gt;when&lt;/strong&gt; the expansion happens: macros are substituted by the preprocessor before compilation, while inline functions are expanded by the compiler during compilation. However, both result in larger binary sizes compared to using regular functions, since the code is duplicated at every call site.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
