title: Benefits of using Native in Android
body: <p>So I am beginning a semester long project and my group has decided to use Android as the target platform. This spiked my curiosity on a question in particular.</p>
  
  <p>I'd imagine under the large majority of the development cases Java and the virtual machine are the best paradigm to be developing under. My question is: <strong>What circumstances warrant using the native software development kit (C/C++) as opposed to Java?</strong></p>
  
  <p>According to Android documentation there are a few points to keep in mind:</p>
  
  <ul>
  <li><p>"you should understand that the NDK will not benefit most apps. As a developer, you need to balance its benefits against its drawbacks. Notably, using native code on Android generally does not result in a noticable performance improvement, but it always increases your app complexity. "</p></li>
  <li><p>"In general, you should only use the NDK if it is essential to your app—never because you simply prefer to program in C/C++."</p></li>
  <li><p>"Typical good candidates for the NDK are self-contained, CPU-intensive operations that don't allocate much memory, such as signal processing, physics simulation, and so on."</p></li>
  </ul>
  
  <p>That is a VERY broad set of statements (especially that last one). From what I have read, using most JVMs nowadays the speed of execution of byte code via JIT compiling is almost, or just as quick as compiling directly to machine code. So I'm looking for multiple responses that clarify in a deeper sense, and more specifically <strong>when do we decide to use native languages for Android development, and what are some good examples of those situations?</strong></p>