Javaä¸çéæå¾å¤AOTç¼è¯ç解å³æ¹æ¡ï¼è½ç¶Oracle/Sun JDKå°JDK8为æ¢é½è¿æ²¡ææä¾è¿æ ·çåè½ã
å
æ¥å ä¸ªä¼ éé¨ï¼
HotSpot VM JITçç¼è¯äº§åºï¼ç论ä¸è½å¦è¢«å¤ç¨ï¼ - RednaxelaFX çåç
éé¸åæ为ä½ä¸è½å¨ç¼è¯æè¿è¡ï¼ - RednaxelaFX çåç
为ä»ä¹Javaä¸è½ç±JVM产çé对ç¹å®æä½ç³»ç»çæºå¨ç ä»èæé«æçï¼ - RednaxelaFX çåç
请æï¼å¯¹Javaç±»åºjaræ件ï¼æä»ä¹å¥½çé²æ¢åç¼è¯åæ³ï¼æ好æ¯å å¯/解å¯æ¹æ¡ï¼èä¸æ¯ä»£ç æ··æ·æ¹æ¡ã - RednaxelaFX çåç
å¦ä½å°Javaæå
æexeæ件å¨æ²¡æJREç¯å¢ççµèä¸æ§è¡ï¼ - RednaxelaFX çåç
å个æä½ç³»ç»ä¸ç JVM æ¯è°å¼ååºæ¥çï¼ - RednaxelaFX çåç
ios设å¤å¦ä½javaç¼è¯ï¼ - RednaxelaFX çåç
javaç°å¨è½ç´æ¥ç¼è¯ææºå¨ç ? - Java
å¨æ·±å
¥å°å
·ä½å®ç°åï¼è¦å
强è°ä¸ç¹ï¼
AOTç¼è¯ï¼Ahead-of-Time Compilationï¼ä¸ä½æ¶åä¸ä¸ªç¼è¯å¨ï¼è¿è¦æ¶åé
å¥çè¿è¡æ¶æ¯æç³»ç»ï¼runtime systemï¼ã两è
é常æ¯ç´§å¯è¦åçã
æ¢
å¥è¯è¯´ï¼ä¸ä¸ªAOTç¼è¯å¨åªè½è·èªå·±çruntimeæé
使ç¨ï¼è¿ä¸ªruntimeå¯ä»¥æ¯ä¸ä¸ªå®æ´çVMï¼å¦NGenä¸CLRçæé
ï¼ï¼ä¹å¯ä»¥æ¯ä¸ä¸ªæ¯è¾
å°çruntimeï¼å¦.NET NativeéçMRTï¼Minimal Runtimeï¼ï¼åªæä¾åºç¡çGCãå¤çº¿ç¨æ¯æçåè½ï¼ã
æ以ä¸è¦æ³å说ä¸é¢å举çå·¥å
·è½å¤å¯¹JavaåAOTç¼è¯ï¼ç¶åè¿è¡æ¶è¿æé
Oracle JDK / OpenJDKæ¥ä½¿ç¨ã
æ¥ççä¸äºå
·ä½å®ç°ã
IBM JDK6+ - Enhance performance with class sharing
IBM JDKæ¯ä¸»æµJDKä¹ä¸ï¼å¹¶ä¸æä¾äºAOTç¼è¯çåè½ã
è¿ä¸ªAOTç¼è¯ç主è¦ç®çæ¯æé«å¯å¨é度ï¼ä»¥åå¨å¤ä¸ªè¿ç¨ä¹é´å
±äº«AOTç¼è¯åºæ¥çæºå¨ç ã
被AOTç¼è¯ç代ç å¨è¿è¡æ¶è¿å¯ä»¥å次被JITç¼è¯ï¼è¿æ ·æ¢è½æé«å¯å¨é度ï¼åä¸ä¼å½±åæé«é度ï¼peak performanceï¼ã
è¿ä¸ªAOTç¼è¯ç¨çç¼è¯å¨å°±æ¯IBM J9 VMéçJITç¼è¯å¨ï¼åªæ¯è®©å®ä»¥AOT模å¼æ¥å·¥ä½ãè¿ç¹è·NGenæç¹ç±»ä¼¼ï¼NGenä¹æ¯ç´æ¥ç¨CLRéçJITç¼è¯å¨æ¥çænative imageï¼ãè·å®æé
使ç¨çruntimeèªç¶å°±æ¯å®æ´çJ9 VMã
ä¸
è¿è·NGenä¸åçæ¯ï¼NGenæ¯ççå¨ç¨åºæ§è¡åå°±åäºç¼è¯ï¼èIBM
J9æä¾çAOTç¼è¯å
¶å®æ¯å¨ç¨æ·ç¬¬ä¸æ¬¡è¿è¡ç¨åºæ¶æç¹æ®æ¨¡å¼çJITç¼è¯çæç代ç ç¼åå°ç£çä¸ï¼åç»æ§è¡çæ¶åå°±å¯ä»¥ç´æ¥ä½¿ç¨è¯¥ç¼åéçæºå¨ç ãæ以
IBMæè¿ä¸ªåè½å«åâdynamic AOTâã
Excelsior JET
ä¸ä¸ªæ¯è¾æççåä¸çJava AOTç¼è¯è§£å³æ¹æ¡ãä»
æ¯æx86ä¸çè¥å¹²æä½ç³»ç»ã
è¿ä¸ªAOTç¼è¯å¨æ¯èªå·±åçä¸ä¸ªç§æçç¼è¯å¨ï¼å
¶æé
使ç¨çruntimeä¹æ¯ç§æçãå®æ¯æå ç§ä¸åçç¼è¯æ¨¡å¼ï¼æé
使ç¨çruntimeå¯ä»¥å®å
¨ä¸å¸¦è§£éå¨/JITç¼è¯å¨ï¼åªå¸¦æGCã线ç¨æ¯æçåè½ï¼ä¹å¯ä»¥å¸¦ææ´å®æ´çJVMåè½ã
ç°å¨å¯è½å¾å¤äººé½ç¥éAndroidçARTï¼è对Javaä¸çéçèåè¾ä»¬æ²¡å¥è®¤ç¥ãå
¶å®ARTçAOTç¼è¯ä¸è§£éå¨/JITæ··åçæ¹å¼ï¼è·Excelsior JETï¼ä»¥åä¸é¢æå°çGCJï¼æ¯ç¸å½ç¸ä¼¼çã
GCJ
ä¸ä¸ªå¼æºçJavaè¿è¡æ¶ç³»ç»ï¼æ¯æAOTç¼è¯ã解éæ§è¡ä¸JITç¼è¯ãGCJæ¯GCCçä¸é¨åãå¨OpenJDKæµè¡èµ·æ¥ä¹åï¼é常åç§Linuxåè¡ç带çJavaå®ç°ä¼æ¯GCJã
RoboVM
ä¸ä¸ªè®©Javaç¨åºå¯ä»¥è¿è¡å¨iOSä¸çå¼æºè§£å³æ¹æ¡ã
iOSä¸å
许第ä¸æ¹ç¨åºåè¿è¡æ¶ä»£ç çæï¼ä¹å°±æ¯ä¸å
许JITç¼è¯ï¼ï¼æ以å¨iOSä¸è¿è¡ç¨åºè¦ä¹å¾AOTç¼è¯ï¼è¦ä¹åªè½è§£éæ§è¡ãOracle ADFéæ©ä½¿ç¨ä¸ä¸ªåªè½è§£éæ§è¡çJVMæ¥æ¯æJavaç¨åºï¼èRoboVMéæ©ä½¿ç¨AOTç¼è¯ã
RoboVMçAOTç¼è¯å¨åå©äºä¸å°ç°æçæ¡æ¶æ¥å®ç°ãå
¶ä¸æéè¦ç两个æ¯Sootä¸LLVMï¼åè
解å³ç¼è¯å¨å端ãåè
解å³ç¼è¯å¨å端ï¼RoboVMèªå·±åªè¦è§£å³ä¸äºè·runtimeæé
çå°æ¹å°±å¥½äºã
RoboVMé
å¥çruntimeæ¯èªå·±åçä¸ä¸ªæ¯è¾å°çruntimeã
VMKit
VMKitæ¯ä¸ä¸ªåºäºè®¸å¤ç°æçåºç»åèµ·æ¥å®ç°çVMï¼ä¸»è¦å¯ä»¥ç¨ä½JVMï¼ä¹å¯é
置为ä¸ä¸ªCLIã
VMKitæ¯æAOTç¼è¯ãå®çJITä¸AOTç¼è¯å¨é½æ¯åºäºLLVMå®ç°çãä¸è¿å®ç°å¾æ¯è¾ç²ç³å¯ã
Avian
Avianä¸æ¯ä¸ä¸ªå®æ´çJVMï¼åªæ¯æJavaçä¸ä¸ªæ¯è¾æç¨çåéãå¾å¤æ¶åä¹å¤ç¨äºã
å®å¯ä»¥æ¯æAOTç¼è¯ã
ART (Android Runtime)
ARTåDalvik VMè½ç¶ä¸ç´æ¥å®ç°Javaåèç ï¼ä½ä»æ´ä¸ªç³»ç»çè§åº¦çå®ä»¬ä¿©é½æ¯ä¸æä¸æ£çJavaç³»ç»ã
ARTæ¯æAOTç¼è¯ä¸è§£éæ§è¡ãJavaç¨åºçå¯å¨é度å¨ARTä¸æ¯æ¯å¨Dalvik VMä¸å¿«å¤äºã
åªæ³å¼ºè°ä¸ç¹ï¼ARTçAOTç¼è¯å¹¶ä¸ä¾èµLLVMã详æ
请åèå¦å¤å 个åçï¼
Android ä¸ç LLVM 主è¦åä»ä¹ï¼ - RednaxelaFX çåç
å¦ä½çå¾
微软æ°åºçLLILCï¼ä¸ä¸ªæ°çåºäºLLVMçCoreCLR JIT/AOTç¼è¯å¨ï¼ - RednaxelaFX çåç
Jikes RVMãMaxine VMãJoeq
è¿ä¸ä¸ªæ¯å
循ç¯Javaèææºç代表ãå
³äºå
循ç¯èææºï¼metacircular VMï¼ï¼è¯·åèå¦ä¸ä¸ªåçï¼ç¨ JavaScript åæç JavaScript 解éå¨ï¼æä¹æ¯ä»ä¹ï¼ - RednaxelaFX çåç
å®ä»¬é½æ¯ç¨çº¯Javaå®ç°çJavaèææºï¼èä¸é½è½ç¬ç«è¿è¡ï¼ä¹å°±æ¯è¯´å¯ä»¥èªä¸¾ï¼bootstrapï¼ãè¦å®ç°bootstrapï¼å®ä»¬å°±å¿
ç¶éè¦è½æ¯æAOTç¼è¯çç¼è¯å¨ã
æ以说å¨è¿ç±»å®ç°éï¼AOTç¼è¯ä¸æ¯ä¸ºäºæé«å¯å¨é度ï¼èæ¯ä¸ºäºå®ç°bootstrapçæ ¹æ¬éæ±ãæ趣çæ¯ï¼å®ä»¬å¯ä»¥ï¼å¨ä¸å®èå´å
ï¼æ¯æå®å¶boot imageçå
容ï¼ä¹å°±æ¯è¯´å¯ä»¥è®©Javaåºç¨ç¨åºä¸JVMä¸èµ·AOTç¼è¯ææboot imageã
JNode - Java New Operating System Design Effort
JNodeæ¯ä¸ä¸ªç¨çº¯Javaå®ç°çæä½ç³»ç»ãè¿æ¯ä¸é¢ä¸ä¸ªå
循ç¯Javaèææºè¿è¦æ´è¿ä¸æ¥ï¼å¯ä»¥å¨è£¸ç¡¬ä»¶ä¸bootstrapãèªç¶ï¼å®ä¹éè¦ä¸ä¸ªæ¯æAOTç¼è¯çç¼è¯å¨ï¼åæ ·æ¯åºäºå®ç°çæ ¹æ¬éæ±ã
Oracle Labs: Substrate VM
Substrate VMæ¯Oracle Labsçä¸ä¸ªç 究项ç®ï¼è·Graalç¼è¯å¨ä¸Truffleæ¡æ¶æé
使ç¨ãå®å®ç°äºä¸ä¸ªå¾å°åçãå¯å®å¶çruntimeï¼å¯ä»¥è®©åºäºTruffleå®ç°çç¼ç¨è¯è¨å¯ä»¥è±ç¦»æ åJVMç¬ç«è¿è¡ã
è¿éï¼Substrate VMæä¾çæ¯runtimeçåè½ï¼çæ£çAOTç¼è¯å¨æ¯Graalã
Oracle/Sun JDK
å
¶
å®Sun以åå¨JDK6æ¶æç 究è¿å®ç°AOTç¼è¯ï¼ä½æ¯å½æ¶éæ©çå®ç°æ¹å¼æ¯è¾åå·§ãåæ¥åç°ææ并ä¸çæ³ï¼èä¸å¨æäºå¤å±ç¼è¯ç³»ç»ï¼tiered
compilation systemï¼ä¹åè¿ä¸ªAOTç¼è¯çååå®ç°å¨å¯å¨é度ä¸æ ¹æ¬æ²¡æä¼å¿ï¼å°±æè¿ä¸ªé¡¹ç®æç½®äºãå
·ä½ç»èæ±æææ æ³å¤è¯´ã
ä½æ¯Oracle JDKå¨è®¡åæä¾æ°çAOTç¼è¯æ¯æãæ许ä¼å¨æªæ¥çæ¬çOracle JDKéåºç°ã请æç®ä»¥å¾
ã
ç®åOracleå¨å
¬å¼åºåä»ç»è¿ä¸ªAOTç¼è¯å¨ç主è¦èµææ¯JVMLS 2015ä¸çä¸ä¸ªæ¼è®²ï¼Java Goes AOT - JVMLS 2015 ï¼æä¸å¼è¯·èªå¤å·¥å
·â¦ï¼ï¼æå
´è¶£çåå¦å¯ä»¥åèä¸ãå®æ¯ä¸ä¸ªåºäºGraalç¼è¯å¨çå®ç°ã
IKVM.NET
åé¢è¯´çAOTç¼è¯è§£å³æ¹æ¡é½æ¯æJavaï¼å
å«Javaåèç çClassæ件ï¼ç¼è¯å°native codeã
http://IKVM.NETæ¯ä¸ç§æ¯è¾ç¹æ®çæ¹æ¡ï¼æJava Classæ件ç¼è¯å°.NET Assemblyï¼ç¶åå¯ä»¥ç¨ä»»æCLIï¼Common Language Infrastructureï¼å®ç°ä¸è¿è¡ï¼ä¾å¦å¾®è½¯çCLRåXamarinçMonoã
åå©CLRçNGenåMonoçAOTç¼è¯ï¼
http://IKVM.NETçæç.NET Assemblyè¿å¯ä»¥è¿ä¸æ¥è¢«ç¼è¯ä¸ºnative codeãè¿æ ·ä¹ç®é´æ¥è¾¾å°äºAOTç¼è¯çç®çã
è¿ä¸æ¯æ¿æ¥æç¬çã
http://IKVM.NETçä½è
åè¿ä¸ä¸ªæ¼ç¤ºï¼å¨Windowsä¸åºäºIKVM+NGenæ¥è¿è¡Eclipseï¼å¯å¨é度æ¯å½æ¶çOracle JDK6å¿«å¾å¤â¦
è·
http://IKVM.NET类似ç项ç®ä»¥åè¿æå 个ï¼ä¾å¦Ja.NETï¼å®ç½æäºï¼ä»ç»å¯ä»¥çInfoQçæ°é»ç¨¿ï¼ãä½æ´»å°ç°å¨çææå°±IKVM.NETä¸å®¶äºã