On Mar 1, 4:22 am, The Alchemist <kap4...@gmail.com> wrote: > I'm wondering if someone could clear up for me whether a Dalvik port > to ThumbEE would be of any benefit, especially when it comes to > startup application performance, before the JIT kicks in.
Not likely. First, the meaning of a couple of existing Thumb2 instructions changes (note the "behavior of some instructions are different" remark on your link [2]), so you either have to build for Thumb2 or ThumbEE, and run the code in the correct mode. Second, there's a 16-cycle flush-everything penalty on a mode switch, so you need to minimize switching in and out (see the cycle count on ENTERX/ LEAVEX on that same page). Third, you have to switch out of ThumbEE mode to run ARM code, which is what the interpreter is currently written in. So you'd need to rewrite the entire interpreter for ThumbEE, and then either rebuild the rest of the VM and all libraries it uses for Thumb2EE, or take the mode-switch penalty every time you want to call a function written in C. Going through all that to get free null-pointer checks doesn't make much sense. On top of that, I don't think the Thumb2 instruction set is the best choice for the interpreter. The interpreter uses the "free" built-in shift fairly often, so the code won't get much smaller, and you'll be executing more instructions. (The ARM instruction setmatches up really well with this sort of thing.) -- unsubscribe: android-porting+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-porting