为什么内存使用2G的苹果手机比内存使用4G的安卓机更流畅?
这是在国外一家网站看到的,分析得不错,原文如下:
Why does the iPhone require less RAM than Android devices?
There are people who always fight when it comes to comparing the Android devices vs iPhone. Iphones are way more 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 an iPhone with 2GB RAM works much faster than an Android device with 2GB RAM with same features.
If you compare the performance of iPhone 7 (2GB RAM) with Google Pixel (4GB RAM) or Samsung s7 (4GB RAM), You’ll see no difference in performance. iPhone 6 was the best performing phone in its time with just 1 GB of RAM. Now, the question is 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 is that memory usage grows until it’s collected, so there might be more memory allocated 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 process, that slows down the device until is has completed.
The iPhone do not use Garbage Collection. It uses Automatic Reference Counting, which is an innovative way of managing Objective-C objects 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 that as long as there are “strong” references to an object, it will not be deallocated. Strong cross-references can accordingly create deadlocks and memory leaks. It is up to the developer to break cycles by using weak references.
Here is the full Difference between ARC vs Garbage Collection
2. User Interface
An Android user often complains about phone lag but the iOS UI runs so smooth. The main reason is that the iOS UI rendering happens in a separate thread with real-time priority but on Android, this happens in the main thread with normal priority. This means that other apps in Android can take over the processor resources and hurt basic UI interactions, translating into a noticeable lag.
3. App management
Android lets developers run processes in the background more freely than iOS. iOS kills any process when 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 app developers that cause memory leaks or resource hogging background processes which means you need to be careful what you install on your Android device. Android has made some attemps to control this, such as killing apps that use too much CPU, but still, these problems can be noticed by the user.
The iOS puts a lot of limitations on the developers and what they can do causes them not to do much harm.
4. Hardware
Apple’s iOS is optimized to run on the hardware, which is also designed and tested by Apple, and manufactured by Apple’s manufacturing partners. Android doesn’t have that level of control because the software OS developers are separate from the hardware makers
为什么内存使用2G的苹果手机比内存使用4G的安卓机更流畅?的更多相关文章
- 程序最多能new多少内存(2G内存里要放程序的5大区,HeapAlloc比new要快多了,而且超过2G的时候会告诉你)
根据<Windows核心编程>得知:X86操作系统提供每个程序最多只有4G的虚拟内存,其中2G虚拟内存提供给系统用(具体用来干什么还待考察),还有2G的内存留给用户使用.那这2G内存能拿来 ...
- 升级win10,提示(RAM)内存不足2G的解决的方法,亲測可行
前两天升级win10,检測我内存不足2G,可我的电脑是8G的内存如图 百度,google了非常多方法,有些是两根内存,去掉一个就好了,但是我的就一根8G的,其它就没什么好的方法了,改biosCPU选项 ...
- Windows系统CPU内存网络性能统计第一篇 内存
最近翻出以前做过的Windows系统性能统计程序,这个程序可以统计系统中的CPU使用情况,内存使用情况以及网络流量.现在将其整理一下(共有三篇),希望对大家有所帮助. 目录如下: 1.<Wind ...
- 【嵌入式开发】裸机引导操作系统和ARM 内存操作 ( DRAM SRAM 类型 简介 | Logical Bank | 内存地址空间介绍 | 内存芯片连接方式 | 内存初始化 | 汇编代码示例 )
[嵌入式开发]ARM 内存操作 ( DRAM SRAM 类型 简介 | Logical Bank | 内存地址空间介绍 | 内存芯片连接方式 | 内存初始化 | 汇编代码示例 ) 一. 内存 ...
- linux内存(二)高端内存
来此网址 https://ilinuxkernel.com/?p=1013 Linux内核地址映射模型x86 CPU采用了段页式地址映射模型.进程代码中的地址为逻辑地址,经过段页式地址映射后,才真正访 ...
- 死磕内存篇 --- JAVA进程和linux内存间的大小关系
运行个JAVA 用sleep去hold住 package org.hjb.test; public class TestOnly { public static void main(String[] ...
- 【腾讯优测干货分享】如何降低App的待机内存(四)——进阶:内存原理
本文来自于腾讯优测公众号(wxutest),未经作者同意,请勿转载,原文地址:http://mp.weixin.qq.com/s/3FTPFvZRqyAQnU047kmWJQ 1.4进阶:内存原理 在 ...
- Linux内核笔记--内存管理之用户态进程内存分配
内核版本:linux-2.6.11 Linux在加载一个可执行程序的时候做了种种复杂的工作,内存分配是其中非常重要的一环,作为一个linux程序员必然会想要知道这个过程到底是怎么样的,内核源码会告诉你 ...
- JVM内存模型、指令重排、内存屏障概念解析
在高并发模型中,无是面对物理机SMP系统模型,还是面对像JVM的虚拟机多线程并发内存模型,指令重排(编译器.运行时)和内存屏障都是非常重要的概念,因此,搞清楚这些概念和原理很重要.否则,你很难搞清楚哪 ...
随机推荐
- Python爬虫从入门到放弃(十九)之 Scrapy爬取所有知乎用户信息(下)
在上一篇文章中主要写了关于爬虫过程的分析,下面是代码的实现,完整代码在:https://github.com/pythonsite/spider items中的代码主要是我们要爬取的字段的定义 cla ...
- Angular4.0从入门到实战打造在线竞拍网站学习笔记之三--依赖注入
Angular4.0基础知识之组件 Angular4.0基础知识之路由 依赖注入(Dependency Injection) 正常情况下,我们写的代码应该是这样子的: let product = ne ...
- OpenCV 之 Mat 类
以前看 OpenCV 的书,或者资料也好,遇到 Mat 类的介绍,一般都是匆匆带过,自以为已经很熟悉了,从来没有深入研究过. 结果前段时间面试了一家公司,被问到两个 Mat 的问题:一是,谈谈对 Ma ...
- Windows下搭建Git 服务器: BONOBO GIT SERVER + TortoiseGit
本文将介绍如何在Windows操作系统下搭建Git服务器和客户端.服务器端采用的是Bonobo Git Server,一款用ASP.NET MVC开发的Git源代码管理工具,界面简洁,基于Web方式配 ...
- akoj-1267-独木舟上的荡漾
独木舟上的荡漾 Time Limit:1000MS Memory Limit:65536K Total Submit:76 Accepted:44 Description 进行一次独木舟的旅行活动, ...
- [Noi2008]假面舞会
考试的时候果断放弃,cout<<"-1 -1"骗10分hhh... 这也是图上问题.注意题目意思: ①如果有多个点指向同一个点,那么他们属于同一类别. ②一个点看到的所 ...
- iOS 折线图实现
图表绘制的过程实际上是坐标位置的计算过程,至于画线只要有了position,通过CAShapeLayer+BezierPath很快就可以画出来,这里提供一个绘制折线的demo,贵在思路,有需要的可以参 ...
- 【FAQ系列】:DB服务器产生大量物理读问题优化思路
一 [现象] 1.7点到9点IO监控指标util特别高,如下: 2 .查看读写情况:读产生很高的物理IO,如下 [分析]:对比其他服务器,buffer pool都是80G,正常情况下热点数据都是从bu ...
- HTML 超链接 表格
1...超链接 <a href="网址" target="_blank"> 被点击的文字</a> 如果把 target 属性设置为&qu ...
- BOM部分笔记整理
BOM部分整理 (章节 8.9) 概览: 一.介绍BOM 在web中,JS的核心对象就是BOM. 1.1 在浏览器中,window对象 == global 所以,你在全局环境下定义的变量,函数都会自动 ...