title: C function argument, memory alignment considerations
body: <p>When defining structs in C, there are considerations regarding padding, if struct size is a concern, its common to re-arrange the values to avoid padding. <em>(see: <a href="https://stackoverflow.com/questions/4306186">Structure padding and packing</a>)</em></p>
  
  <p>My questions is:</p>
  
  <p>Do the same <em>(or similar)</em> rules apply to function arguments?
  ... is there any advantage in arranging arguments to avoid argument padding bytes?</p>
  
  <hr>
  
  <ul>
  <li><p><em>Assuming this isn't an <code>inline</code> (where it wont matter), or <code>static</code> function where the compiler could re-arrange arguments.</em></p></li>
  <li><p><em>Accepting that the real world measurable improvement is likely to be small.</em></p></li>
  </ul>
  
  <p><em>... in practice if function call overhead is a concern, it may be worth inlining the function. nevertheless, inlining isnt always an option (libraries or function pointers for eg).</em></p>