当前位置:网站首页>GVM use

GVM use

2022-07-04 20:47:00 The great man ate a Kun on the day he was alive

1.GVM What is it

GraalVM Is a high-performance runtime , Significantly improve application performance and efficiency , Great for microservices . It is designed to Java,JavaScript, be based on LLVM Language ( for example C and C ++) And other applications written in dynamic languages . It eliminates the isolation between programming languages , The interoperability of shared runtime is realized .
Refer to official documentation https://www.graalvm.org/docs/introduction/
GraalVM It can run independently , It can also be used as OpenJDK or Node.js Part of the platform is embedded , Even in Oracle Execute... In the database .
Use GraalVM Can be Java The machine code directly compiled into binary is applied to generate a Native Image, Let this program run like a general binary file ,Native Image You can start a faster Java application , Native Image Quick start feature , It can achieve the purpose of server free computing .

2. What's the advantage

GraalVM It can run independently , It can also be used as OpenJDK or Node.js Part of the platform is embedded , Even in Oracle Execute... In the database . It's hanging anyway .

Use GraalVM Can be Java The machine code directly compiled into binary is applied to generate a Native Image, Let this program run like a general binary file ,Native Image You can start a faster Java application , Native Image Quick start feature , It can achieve the purpose of server free computing .

You can also reuse data from Java、R or Python The library of , It doesn't have to be used in jython,j++, That kind of Library .

And it can be based on jvm Create a native image for your application . The image generation process uses static analysis to find slave images Java Method can access any code , Then execute completely in advance (AOT) compile . The generated native binary file contains the whole program in the form of machine code , For immediate execution . It can be linked to other local programs , You can also choose to include GraalVM compiler , To provide real-time monitoring (JIT) Supplementary support for compilation , To run any based on graalvm High performance language for . For additional performance , The native image can be built by optimizing the configuration file collected in the previous run of the application

3. Use

gu --version
gu install native-image
gu list Check for success :
./helloworld perform

jar --create --verbose --file HelloWorld.jar --main-class HelloWorld *.class
time java -jar HelloWorld.jar
time ./helloworld

原网站

版权声明
本文为[The great man ate a Kun on the day he was alive]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/185/202207041903343422.html

随机推荐