4 ms·
I still have a problem with using a VM on a phone and having GC on a phone. (I also have a problem with Objective C's function call overhead.)
by bhiggins 16y ago
I still have a problem with using a VM on a phone and having GC on a phone. (I also have a problem with Objective C's function call overhead.)
- mahmud 16y agoMacho. But a phone is exactly where you want a VM. In fact, I would love to be able to push vm images for my phone from my desktop machine. Wake up, plug phone, push image. Security upgrades, new GPS data, my downloaded podcasts, news, emails, etc. I want to be able to come home with a new handset, plug it, and have my "phone" back.
- jlazarow 16y agoPretty sure he meant Dalvik.
- mahmud 16y agoDalvik is not the only VM on a phone, and Android is not the only phone with a GC, nor is it coded primarily in Objective-C natively. Pretty sure he was speaking 'in general'.
- regularfry 16y agoTotally different use of the term "virtual machine". You're talking about a virtualised execution environment, or hardware virtual machine (as executed by virtualbox, xen or whatever); he's talking about a runtime virtual machine (like the CLR, JVM, or Dalvik).
- mahmud 16y agoThe distinction is negligible on the mobile phone where the the 'runtime VM' takes care of memory allocation for even "native" C code.
- tomjen3 16y agoThis isn't hard realtime systems. Nobody is going to die because it takes a few seconds extra for them to download updates (the human brain takes a lot longer to process it anyway). And JIT compiled java can be faster than native code, even in situations where you would not expect it (such as signal handling code).
- vetinari 16y agoSignal handling code on android phones is not only native, it runs on separate core too. But your points are true anyway.
- glhaynes 16y agoWhy, if the resulting products are performant and capable?
- bhiggins 16y agodrains battery too fast
- duskwuff 16y agoHave you ever looked at Apple's objc_msgSend implementation? It's pretty fast, really.