3 ms·
> modern Android phones have 4 to even 8 cores, That leaves plenty of horsepower to do the JITing in the background Android can't really look at the world lik
by edderly 12y ago
> modern Android phones have 4 to even 8 cores, That leaves plenty of horsepower to do the JITing in the background
Android can't really look at the world like that, the platform is being used in wearables through to what will be console class devices.
Android must be able to work in the low-end, take project Svelte for example, as being important to get Android (back) to being usuable in 512MB devices.
Also typically most effective power management strategies run to idle then off, rather than keep power consumers alive at some nominal frequency.
> Overhead from repeatedly having to JIT the code? Cache it
Caching in memory is a limitation because of basic memory constraints, and caching to persistent storage (swap) is not a great option because of the relative speed of mobile storage and to a certain extent wear levelling effects on flash may also be a concern.
I argue that what gets lost in the fog when talking about JITs and virtual machines vs static / AOT based solutions is that VMs can be very performant when you can ignore startup time and when there is a single instance of a VM that you have to manage on a system.
Take an Android device and look at the number of activities resident at any one time, you'll have 10 maybe 20 plus activities present, each of which is an instance of a virtual machine spawned from Zygote. This makes memory footprint of the VM critical, because the penalty for restarting Activities is often pretty high.