当前位置:网站首页>GVM使用
GVM使用
2022-07-04 19:03:00 【大丈夫在世当日食一鲲】
1.GVM是啥
GraalVM是一种高性能的运行时,可显着提高应用程序的性能和效率,非常适合微服务。 它设计用于以Java,JavaScript,基于LLVM的语言(例如C和C ++)以及其他动态语言编写的应用程序。 它消除了编程语言之间的隔离,并实现了共享运行时的互操作性。
参考官方文档https://www.graalvm.org/docs/introduction/
GraalVM 既可以独立运行,也可以作为 OpenJDK 或 Node.js 平台的一部分嵌入,甚至可以在 Oracle 数据库中执行。
使用 GraalVM 可以将 Java 应用直接编译成二进制的机器码生成一个 Native Image,让这个程序可以像一般二进制文件运行,Native Image 可以更快速的启动一个 Java 应用, Native Image 的快速启动特性,能够达到无服务器计算的目的。
2.有啥锤子好处
GraalVM 既可以独立运行,也可以作为 OpenJDK 或 Node.js 平台的一部分嵌入,甚至可以在 Oracle 数据库中执行。反正很吊。
使用 GraalVM 可以将 Java 应用直接编译成二进制的机器码生成一个 Native Image,让这个程序可以像一般二进制文件运行,Native Image 可以更快速的启动一个 Java 应用, Native Image 的快速启动特性,能够达到无服务器计算的目的。
还可以重用来自 Java、R 或 Python 的库,在也不用使用jython,j++,之类的库了。
并且可以为现有的基于 jvm 的应用程序创建本机映像。映像生成过程使用静态分析来查找从主 Java 方法可访问的任何代码,然后执行完全提前(AOT)编译。生成的本机二进制文件以机器码的形式包含整个程序,以便立即执行。它可以与其他本地程序链接,也可以选择包含 GraalVM 编译器,以提供对实时(JIT)编译的补充支持,从而运行任何基于 graalvm 的高性能语言。为了获得额外的性能,可以通过在应用程序前一次运行中收集的配置文件优化来构建本机映像
3.使用
gu --version
gu install native-image
gu list 查看是否成功:
./helloworld 执行
jar --create --verbose --file HelloWorld.jar --main-class HelloWorld *.class
time java -jar HelloWorld.jar
time ./helloworld
边栏推荐
- HMM hidden Markov model and code implementation
- Application practice | Shuhai supply chain construction of data center based on Apache Doris
- #夏日挑战赛#带你玩转HarmonyOS多端钢琴演奏
- Actual combat simulation │ JWT login authentication
- Win11无法将值写入注册表项如何解决?
- Informatics Olympiad 1336: [example 3-1] find roots and children
- c# . Net MVC uses Baidu ueditor rich text box to upload files (pictures, videos, etc.)
- 凌云出海记 | 一零跃动&华为云:共助非洲普惠金融服务
- FS4061A升压8.4V充电IC芯片和FS4061B升压12.6V充电IC芯片规格书datasheet
- 实战模拟│JWT 登录认证
猜你喜欢
Small hair cat Internet of things platform construction and application model
FS4061A升压8.4V充电IC芯片和FS4061B升压12.6V充电IC芯片规格书datasheet
【ISMB2022教程】图表示学习的精准医疗,哈佛大学Marinka Zitnik主讲,附87页ppt
Application practice | Shuhai supply chain construction of data center based on Apache Doris
关于联邦学习和激励的相关概念(1)
[Beijing Xunwei] i.mx6ull development board porting Debian file system
Ziguang zhanrui completed the first 5g R17 IOT NTN satellite on the Internet of things in the world
C server log module
Neural network IOT platform construction (IOT platform construction practical tutorial)
ICML 2022 | meta proposes a robust multi-objective Bayesian optimization method to effectively deal with input noise
随机推荐
易周金融 | Q1保险行业活跃人数8688.67万人 19家支付机构牌照被注销
2022 Health Exhibition, Beijing Health Expo, China Health Exhibition, great health exhibition November 13
Thinking on demand development
Cdga | six principles that data governance has to adhere to
Hash哈希竞猜游戏系统开发如何开发丨哈希竞猜游戏系统开发(多套案例)
Why is the maximum speed the speed of light
In the first month of its launch, the tourist praise rate of this campsite was as high as 99.9%! How did he do it?
针对深度学习的“失忆症”,科学家提出基于相似性加权交错学习,登上PNAS
Is it necessary to apply for code signing certificate for software client digital signature?
Is it safe for Great Wall Securities to open an account? Stock account opening process online account opening
Small hair cat Internet of things platform construction and application model
Write it down once Net analysis of thread burst height of an industrial control data acquisition platform
AP8022开关电源小家电ACDC芯片离线式开关电源IC
Length of the longest integrable subarray
Related concepts of federal learning and motivation (1)
Stack: how to realize the judgment of valid brackets?
Prometheus installation
In operation (i.e. included in) usage of SSRs filter
Pointnet / pointnet++ point cloud data set processing and training
Kotlin basic data type