Connect with us

Sci & Tech

Why iPhones Run Faster Than Android With Higher RAM

Published

on

An iPhone XS and a Galaxy S10

In a world where Android users Rival IOS users for superiority one of the major points Android users tend to gloat about is the amount of RAM their devices carry. Samsung’s flagship smartphone the Samsung S10 plus offers about 8GB of RAM while Apple’s iPhone XS Max offers 4GB of RAM. To give you an idea of how excessive 8GB of RAM is most modern laptops don’t even come with that much.

So why do iPhones get less amount of RAM and still perform the same (if not better) than Android phones with more amounts of RAM? it all has to do with the fundamental difference in the way iOS and Android handle apps. According to Glyn Williams over on Quora, iOS devices run better than Android devices with twice the RAM because Android apps use Java, and need all the extra RAM to do garbage collection.

Java

From the very beginning, Android was designed to support many different processor types, many different manufacturers, and many different hardware configurations. Normally, software written for one kind of system can’t just run on another; it has to be “ported” over, which often involves rewriting the incompatible bits.

To get around this, Android apps have always run on the Java platform. Java is nifty because of its virtual machine: you can write an app once in Java, and then the virtual machine “translates” that code at runtime to work on whatever system it’s on instead of rewriting and recompiling the code yourself. The Java virtual machine is complex and requires a lot of RAM, not just to manage the actual processes of the virtual machine itself, but also to hold the original Java code for whatever app is being executed

Related Content:  Beneath the Surface: Understanding The Deep And Dark Web

Garbage Collection

What’s garbage collection? It’s a process that triggers the recycling of memory once an Android app is done using it. Usually, this works pretty well on systems that have a lot of free RAM, but once you get a lot of different apps running, things start getting dicey. A large part of Android (and Android apps) are generally written in Java because it is the official language for Android development. Due to how Java is configured, memory released by apps that are not in use anymore has to be recycled back to the device via the garbage collection process. Unused memory (garbage) has to be cleaned and recycled to the system so it can be used by other apps. Garbage collection is super effective for the smooth running of Android device but the problem is that the process itself needs sufficient amount of RAM.

According to Williams, Android’s garbage collectors work best when Android apps have 4 to 8 times as much memory as is actually needed in order to perform the garbage collection process. Once you stop having that amount of free memory available, performance starts suffering.

IOS

Apple exerts a lot more control over the entire iOS ecosystem. If you want to use iOS, then you only have one option for a phone: the iPhone. Apps for the Apple store are created using Apple’s tools only because Apple knows the exact specifications of every single device that will ever run its operating system, thus can make design decisions accordingly. additionally all IOS apps are compiled to native code, and that code is executed directly on the hardware. No need for a virtual machine means significantly less RAM used overall.

Related Content:  How To Access Your ‘Daylist’ On Spotify

IOS therefore needs less RAM to run more smoothly than Android does since it was designed to avoid garbage collection from scratch therefore only needing the memory it’s using. What a radical idea, huh?

Source – Quora


Kenya Insights allows guest blogging, if you want to be published on Kenya’s most authoritative and accurate blog, have an expose, news TIPS, story angles, human interest stories, drop us an email on [email protected] or via Telegram

Advertisement
Advertisement

Most Popular