title: Struct in C, are they efficient?
body: <p>I'm reading some C code like that:</p>
  <pre><code>double function( int lena,double xa,double ya, double za, double *acoefs, ...,
                   int lenb,double xb,double yb, double zb, double *bcoefs, ...,
                   same for c,
                   same for d )
  </code></pre>
  <p>This function is called in the code more than 100.000 times so it's performance-critical.</p>
  <p>I'm trying to extend this code but I want to know if it's efficient or not (and how much this influences the speed) to encapsulate all the parameters in a struct like this</p>
  <pre><code>struct PGTO { int len; double x,y,z ; double *acoefs }
  </code></pre>
  <p>and then access the parameters in the function.</p>