Change Java to use array indexes instead of methods
Method invocations are not entirely free on Android. Change the generated Java code to use the same array-based approach used in JS and C to compute dimensions, positions, etc instead of relying too heavily on method invovations. As a bonus, the Java transpiler becomes a lot simpler because the code is more analogous to the C counterpart. In my local benchmarks this change gives us a major performance boost on Android (between 15% and 30%) depending on the device and the runtime (Dalvik|Art).
This commit is contained in: