This archive report was first published on 26 August 2019.
Published on August 26, 2019, a Quora user, Glyn Williams, shed light on why iPhones can outperform Android devices with more RAM. According to Williams, the reason lies in the way iOS and Android handle apps.
iOS devices run better than Android devices with twice the RAM because Android apps use Java, which requires extra RAM for garbage collection. In contrast, iOS apps are compiled to native code, executed directly on the hardware, and do not need a virtual machine, resulting in significantly less RAM usage.
Android's garbage collectors work best when apps have 4 to 8 times as much memory as needed for garbage collection. However, once this amount of free memory is not available, performance starts to suffer. This is because the garbage collection process itself requires sufficient RAM.
Apple's control over the iOS ecosystem allows it to design apps that only require the memory they use, without the need for a virtual machine. This approach enables iOS devices to run smoothly with less RAM compared to Android devices.