Загрузка...

What is Android Runtime (ART)? ART vs Dalvik explained #Shorts day9 aosp #100daysofaosp #androiddev

Dalvik: JIT compile every run. ART: AOT compile once at install. Same app — completely different runtime speed. 🔥 #100DaysOfAOSP

📱 Day 9 of 100 — ART vs Dalvik

In Android 5.0 (Lollipop), Google replaced the Dalvik VM with ART. Apps didn't change. The runtime did. And everything got faster. Here's why.

🔴 Dalvik (Android 1.0 — 4.4)
- JIT (Just-In-Time) compilation — interprets DEX bytecode at runtime
- Hot code paths compiled on the fly, every single app launch
- 32-bit architecture only
- Stop-the-world garbage collection = noticeable stutters
- Slow cold start times

🩷 ART (Android 5.0+)
- AOT (Ahead-of-Time) compilation — bytecode compiled to native at INSTALL time
- App launches directly execute pre-compiled native machine code
- Full 64-bit support
- Concurrent generational GC — far fewer, shorter pauses
- dex2oat tool compiles DEX → .oat files stored in /data/dalvik-cache/

📊 The Core Difference:
DALVIK: Install → Run → Interpret → JIT compile hot paths → Execute (every time)
ART: Install → dex2oat compiles to native → Run → Execute native directly

⚡ ART Advantages:
✅ Faster app launch
✅ Better battery life (less CPU burn at runtime)
✅ Smoother UI (concurrent GC = no jank)
✅ 64-bit native support

⚠️ ART Trade-offs (vs Dalvik):
- More storage used (.oat files on disk)
- Slower install time (dex2oat runs at install)

💡 One-liner to remember:
"Dalvik cooked your code every time you ordered. ART pre-cooked it when you first arrived. Same meal — completely different speed."

——————————————————————
📚 100 Days of AOSP — One question. Every day.
Day 10 dropping tomorrow. Follow so you don't miss it.
——————————————————————

#AOSP #ART #Dalvik #AndroidRuntime #AndroidDev #AndroidPerformance #AOT #JIT #100DaysOfAOSP #MobileDevelopment

Видео What is Android Runtime (ART)? ART vs Dalvik explained #Shorts day9 aosp #100daysofaosp #androiddev канала SiliconToSystem
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять