title: Turn off ALL optimization by Dalvik VM
body: <p>So I'm trying to write some low-level code for Android, and my main concern is that I want to avoid ALL optimization by the JIT compiler (or anything else).  After doing some research, the best approach seems to be to:</p>
  
  <ol>
  <li>write Java bytecode by hand</li>
  <li>convert it to a dex file using the "dx" command</li>
  <li>run it on the program using the "dalvikvm" command  (via adb shell) with the "-Xverify:none -Xdexopt:none" paramaters specified</li>
  </ol>
  
  <p>My question is: will this in fact avoid ALL optimization?  The previous discussion here <a href="https://groups.google.com/forum/#!topic/android-platform/Y-pzP9z6xLw" rel="nofollow">https://groups.google.com/forum/#!topic/android-platform/Y-pzP9z6xLw</a> makes me unsure, and I can't 100% convince myself by reading the docs.</p>
  
  <p>Any confirmation one way or the other is greatly appreciated.</p>