4 ms·
Here's the fundamental difference between iOS and Android, and it's related to memory management: On iOS, you pay for memory management in small installments,
by gridlockd 6y ago
Here's the fundamental difference between iOS and Android, and it's related to memory management:
On iOS, you pay for memory management in small installments, which make your code slower overall (reference counting in ObjC/Swift), but predictably so.
On Android, you pay almost nothing for memory management until at some random point the garbage collector shows up and stops your program to clean up your mess. Your program is going to be janky.
Apple deliberately ships devices with little RAM and kills applications that use too much of it. As a developer you better pay attention, or you will be flooded with bad reviews.
Google leaves RAM up to vendors. The secret to good performance with GC is to make the heap twice as large as the data which it contains. Low-end Android devices feel low-end, not just because of slower CPUs, but also because of too little RAM.
It has nothing to do with the "JVM abstraction layer". Java code on a good JIT easily runs faster than Swift or ObjC if there's a lot of allocations involved, but the GC behavior must be accounted for to give a good experience.
- deleted 6y ago[deleted]