{"id":194,"date":"2014-11-17T15:51:28","date_gmt":"2014-11-17T15:51:28","guid":{"rendered":"http:\/\/jeffcardillo.com\/blog\/?p=194"},"modified":"2025-04-21T05:11:01","modified_gmt":"2025-04-21T05:11:01","slug":"androids-new-runtime-art-quick-overview","status":"publish","type":"post","link":"http:\/\/jeffcardillo.com\/blog\/2014\/11\/17\/androids-new-runtime-art-quick-overview\/","title":{"rendered":"Android&#8217;s New Runtime (ART) &#8211; Quick Overview"},"content":{"rendered":"<p>The new Android Runtime (ART) has been lurking under the covers as an experimental developer option (on select android phones) since Android KitKat 4.4. Android Lollipop 5.0 makes ART the default runtime. Let&#8217;s take a quick look at\u00a0what impact this will have on our apps.<\/p>\n<p><!--more--><\/p>\n<p>Prior to Lollipop, Android\u00a0used the Dalvik runtime. Dalvik is a Just In Time (JIT) runtime which means that an application&#8217;s bytecode is not converted to executable machine code\u00a0until it is launched. Even then, only the parts of the application that are needed are converted.<\/p>\n<p>Lollipop&#8217;s runtime is the new ART, which trades JIT for Ahead of time Compilation (AOT). This means that all applications are converted to machine code\u00a0before they are launched, leading to much faster load times. Also,\u00a0with the older JIT, the runtime performed some class and method verification at runtime that will have already taken place with AOT, further reducing the execution overhead and increasing performance.<\/p>\n<p>The actual conversion from bytecode to machine code now takes place during the installation of an app. This leads to longer install times and a larger application footprint (because of the storage of machine code), but its all for the sake of better performance later.<\/p>\n<p>Another dramatic change with the ART\u00a0has to do with how the runtime handles Garbage Collection (GC). ART reduces the number of times the runtime pauses for GC, and also has reduced the amount of time GC runs for a foreground application. For example, Google claims that prior to ART, for a particular time period you may have seen 2 pauses for GC\u00a0totaling about 10ms of time. With ART, you may see 1 pause for a total time of 2ms for the same time period, which will have much less impact on the performance of an application. Note that ART defers a full GC run until the phone is locked\u00a0or user interaction is not indicated.<\/p>\n<p>ART is designed to support a mix of AOT, JIT, and interpreted paradigms. The ART runtime has cross platform support for ARM, x86, and MIPS architectures, and it introduces\u00a0full 64-bit support for ARMv8, x86-64, and NIP 64 architectures.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The new Android Runtime (ART) has been lurking under the covers as an experimental developer option (on select android phones) since Android KitKat 4.4. Android Lollipop 5.0 makes ART the default runtime. Let&#8217;s take a quick look at\u00a0what impact this will have on our apps.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","_links_to":"","_links_to_target":""},"categories":[9,21],"tags":[3,23,22],"class_list":["post-194","post","type-post","status-publish","format-standard","hentry","category-android","category-news","tag-android","tag-art","tag-news"],"_links":{"self":[{"href":"http:\/\/jeffcardillo.com\/blog\/wp-json\/wp\/v2\/posts\/194","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/jeffcardillo.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/jeffcardillo.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/jeffcardillo.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/jeffcardillo.com\/blog\/wp-json\/wp\/v2\/comments?post=194"}],"version-history":[{"count":16,"href":"http:\/\/jeffcardillo.com\/blog\/wp-json\/wp\/v2\/posts\/194\/revisions"}],"predecessor-version":[{"id":270,"href":"http:\/\/jeffcardillo.com\/blog\/wp-json\/wp\/v2\/posts\/194\/revisions\/270"}],"wp:attachment":[{"href":"http:\/\/jeffcardillo.com\/blog\/wp-json\/wp\/v2\/media?parent=194"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/jeffcardillo.com\/blog\/wp-json\/wp\/v2\/categories?post=194"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/jeffcardillo.com\/blog\/wp-json\/wp\/v2\/tags?post=194"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}