Android 5.0:ART 取代 Dalvik ?

Android 5.0:ART 取代 Dalvik

参考:http://www.pcpop.com/doc/0/967/967006.shtml


Android 运行环境

    Dalvik
        一直以来,Dalvik 虚拟机背负着 Android 应用卡顿的罪名;

        其实在 Android 4.2 以前,安卓手机系统的应用程序均在 Dalvik Java 的虚拟机上运行;

        这种运行模式在运行应用的过程中,还要依靠一个编译器来实现与应用程序的沟通。

        应用程序每次运行时,都需要将程序内的代码即使转变为机器码才能运行,这无形中多附加了一道手续,

        这就造成了耗电相对较快、占用内存大、即使是旗舰机用久了也会卡顿严重的现象。

    ART,Android Runtime 的简称。

        优点:

            通过在安装应用程序时,自动对程序进行代码预读取编译,

            让程序直接编译成机器语言,免去了Dalvik模式要时时转换代码,

            实现高效率、省电、占用更低的系统内存、手机运行流畅。

        缺点:

            占用略高一些的存储空间;

           安装程序时要相比普通 Dalvik 模式要长一些时间来实现预编译;

    关于 ART 模式与 Dalvik 究竟有什么本质的不同,打个比方就明白了:

        Dalvik模式像是一台折叠自行车,每次骑之前都要组装后才能上路。

        而ART模式就是一个已经装好的自行车,直接就能上车走人。

        所以ART模式在效率上肯定是要好于Dalvik这已经基本毫无悬念,

        我们目前能做的就是耐心等待应用厂商对程序进行优化,以此适配ART模式,好有一种全新的体验。


  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Android虚拟机Dalvik完整源码,宝贵资源,欢迎下载! This directory contains the Dalvik virtual machine and core class library, as well as related tools, libraries, and tests. A note about the licenses and header comments --------------------------------------------- Much of the code under this directory originally came from the Apache Harmony project, and as such contains the standard Apache header comment. Some of the code was written originally for the Android project, and as such contains the standard Android header comment. Some files contain code from both projects. In these cases, the header comment is a combination of the other two, and the portions of the code from Harmony are identified as indicated in the comment. Here is the combined header comment: /* * Copyright (C) The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * ---------- * * Portions of the code surrounded by "// BEGIN Harmony code" and * "// END Harmony code" are copyrighted and licensed separately, as * follows: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ Native SH call bridge --------------------- Native SH call bridge is written by Shin-ichiro KAWASAKI and Contributed to Android by Hitachi, Ltd. and Renesas Solutions Corp.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值