title: Does instantiating a runnable ahead of time help increase performance?
body: <p>I'm designing a game which requires fast animations which I'm implementing using handlers and runnables.</p>
  
  <p>For example:</p>
  
  <pre><code>public void animateSomething(){
  final Handler h = new Handler();
  final Runnable r = new Runnable()
  {
  public void run()
  {
  xxx.setImageDrawable(...);
  h.postDelayed(this, 20);
  }
  };
  h.post(r);
  }
  }
  </code></pre>
  
  <p>My question is: Does declaring the runnable at starttime and only posting it in the "animateSomething()" function has any impact on performance or there isn't any difference between declaring the runnable in a function and posting it afterwards?</p>