Android:What is ART?

來源:互聯網
上載者:User

標籤:android art kitka

背景:Android4.2之前,安卓手機系統的應用程式均在Dalvik Java的虛擬機器上運行,這種運行模式還要依靠一個編譯器來實現與應用程式的溝通。應用程式每次運行時,都需要將程式內的代碼轉變為機器碼才能運行,這無形中多附加了一道手續,這就造成了手機耗電相對較快,佔用記憶體大,用久了會卡頓的現象。

前言:KitKat(奇巧巧克力):雀巢的巧克力棒產品,最近Google宣布最新4.4版Android將命名為"KitKat"

One of the greatest features of Android 4.4.x KitKat, also probably the most under-reported one, is the next generation Android RunTime (ART).

翻譯:Android4.4.x KitKat 最顯著的特徵之一就是下一代的Android Run Time(ART),或許也是下一個即將被廣為關注的特徵

What is ART?

翻譯:什麼是ART? (藝術)

When you start any apps on your Android device, the system actually takes some time and effort to compile the app package to machine code so your device can understand and execute. It does this Just in Time of execution. So as you run apps on your device, it actually keeps doing these resource intensive tasks in the background and this is a major reason why people notice Android apps are a bit sluggish when compared to their iOS counterparts.

翻譯:當你在你的Android裝置上啟動任意app程式,系統都會耗費一些時間和精力(資源)去把該app包檔案編譯成機器碼,以便你的裝置可以理解並運行。這個過程在程式運行時執行。所以當你在你的裝置上運行你的app程式,事實上,在後台也同時運行著這些很耗費資源的任務。這也是和蘋果IOS系統相比,在Android系統上運行app程式會讓人感覺的有些緩慢的主要原因。
This is, until you switch to the new Android RunTime (ART).

翻譯:這個問題會一直存在,除非你換到新的Android Run Time。

With ART enabled, machine code compilations are done Ahead of Time during app installation. So when you run apps on your device, it can skip all that and simply executes the code directly.
翻譯:在ART啟用的情況下,機器碼的編譯會在app程式安裝過程中提前編譯完成。這樣當你在你的裝置上運行你的app程式,它可以跳過編譯的過程,直接運行編譯好的機器碼。

The result? Reports show that ART yields performance improvements of around 10% to 20% on average. On the other hand it also boosts battery life because your device now does a lot less resource intensive machine code compiling. Take into considerations ART is currently a preview technology in Android 4.4.x KitKat so it can only get better and better in upcoming Android releases.

翻譯:這樣做的結果是什麼呢?報告顯示ART使得操作效能平均提高10%到20%。而另一方面,這也延長了電池的使用時間。因為現在你的裝置大大減少了執行編譯機器碼這一耗費資源的行為。考慮到ART目前只是運用在Android4.4.X KitKat版本上,因此在未來發布的Android版本中ART只會越來越好。


英文原文截取自: http://www.mobilehiddencamera.com/

翻譯時間:2014年6月23日


相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.