3 ms·
I wonder if the dalvik VM is optimized for regular computer architectures or only for the G1. Either way, I remember reading that Dalvik (or, well, Java) was c
by litewulf 18y ago
I wonder if the dalvik VM is optimized for regular computer architectures or only for the G1.
Either way, I remember reading that Dalvik (or, well, Java) was chosen for the constraints it places on the programmer and access to verification tools? Security or some such?
- michaelneale 18y agoDalvik is register based byte code - from what little I have looked at it - it looks quite low level and apparently it is meant to run fast enough "interpreted" (ie a JIT isn't practical on small devices). However JVM bytecode (and similar) being stack based is much higher level, leaving more room for JITs to make a faster runtime (but for some cost which is not practical on small devices) - but slower when "interpreted". At least that is my understanding.
- wmf 18y agoThis is a good summary of the conventional wisdom, but I don't know if it's right. Phones are now about as powerful as PCs from ten years ago; IIRC we were using JITs on those PCs. Is Dalvik really "fast enough"? If, say, 5x more performance was available, would developers not use it?
- michaelneale 18y agohmm... 10 years ago I don't remember thinking that fondly of JITed runtimes - sure they worked in a server context with long running apps that had time to warm up, but not so much on the desktop. I guess its a tradeoff - to a user a JITed app would appear a bit slow at first, but get faster the more you use it (plus you would then need to probably persist the JIT codes, as you close/open apps all the time in android) which has more complexity. A fast runtime like dalvik is the same speed pretty much all the time. Yes, it is conventional wisdom, but I am not sure if phones are as fast as we think yet. Sure my iphone runs at what, 450Mhz ? which is quick, but we may forget that JIT'ing of client side apps only recently became fast enough (at least to my taste).
- litewulf 18y agoMany phones don't run at their full CPU speed to save battery power...