This is seen on a foreign site, the analysis is good, the original text is as follows:
Why does the iPhone require less RAM than Android devices?
There is people fight when it comes to comparing the Android devices vs IPhone. Iphones is the expensive than Android devices even with the same specifications. However, the IPhone works a lot smoother and faster than an Android device with the same amount of RAM. That means a iPhone with 2GB RAM works much faster than a Android device with 2GB RAM with same features.
If you compare the performance for IPhone 7 (2GB RAM) with Google Pixel (4GB RAM) or Samsung S7 (4GB RAM), you'll see no D Ifference in performance. IPhone 6 is the best performing phone in it time with just 1 GB of RAM. Now, the question are why does the iPhone require less RAM than Android devices? Why does the Android device need more RAM?
Why does the iPhone require less RAM than Android devices?
It involves many factors. Basically the garbage collection, App Management, User Interface, and Hardware.
1. Garbage collection
In the case of Android, since it involves garbage collection it requires more memory. The Android apps use Java and as a result, Android does garbage collection. The problem with garbage collection are that memory usage grows until it's collected, so there might being more memory allocat Ed than necessary. That's bad for devices with restricted memory and no option to swap.
When the garbage collector runs, it scans the "heap to find memory" that's no longer being used, and that's an expensive pro Cess, that's slows down the device until was has completed.
The iPhone does not use garbage Collection. It uses Automatic Reference counting, which are an innovative-on-the-managing-objective-c on IOS. It does away with explicit retain, release and autorelease messages, and it behaves the same on both platforms. Unlike garbage collection, ARC does not handle reference cycles automatically. This means as long as there is "strong" references to an object, it is not being deallocated. Strong cross-references can accordingly create deadlocks and memory leaks. It is an up-to-developer-break cycles by using weak references.
Read:premium ethical Hacking and programming courses online
Here's the full difference between ARC vs garbage Collection
2. User Interface
An Android user often complains on phone lag but the IOS UI runs so smooth. The main reason is and the IOS UI rendering happens in a separate thread with real-time priority and on Android, this hap The pens in the main is thread with a normal priority. This means that other apps in Android can take over the processor resources and hurt basic UI interactions, translating in To a noticeable lag.
3. APP Management
Android lets developers run processes in the background more freely than IOS. IOS kills any process if it thinks it doesn ' t need to be running. Apps that play music in the background or similar can stay alive.
Android gives a lot of freedom to apps developers that cause memory leaks or resource hogging background processes which me Ans You need to is careful what do you install on your Android device. Android have made some attemps to control this, such as killing apps that use too much CPUs, but still, these problems can B E noticed by the user.
The IOS puts a lot of limitations in the developers and what they can does causes them not to do much harm.
4. Hardware
Apple's IOS is optimized-run on the hardware, which are also designed and tested by Apple, and manufactured by Apple ' s M Anufacturing Partners. Android doesn ' t has this level of control because the software OS developers is separate from the hardware makers
Why is memory using a 2G iphone more fluid than using a 4G Android device in memory?