title: C: using a lot of structs can make a program slow?
body: <p>I am coding a breakout clone. I had one version in which I only had one level deep of structures. This version runs at 70 fps.</p>
  
  <p>For more clarity in the code I decided the code should have more abstractions and created more structs. Most of the times I have two two three level deep of structures. This version runs at 30 fps.</p>
  
  <p>Since there are some other differences besides the structures, I ask you: Does using a lot of structs in C can slow down the code significantly?</p>
  
  <p>For example on the second version, I am using:</p>
  
  <pre><code>struct Breakout
  {
     Ball ball;
     Paddle paddle;
     Level* levels;
  }
  
  struct Level
  {
     Bricks* bricks;
  }
  </code></pre>
  
  <p>So, I am using lots of times breakout.levels[level_in_play].bricks[i].visible for example. Will this be a possible cause?</p>
  
  <p>Thanks.</p>