当前位置:网站首页>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
边栏推荐
- 输入的查询SQL语句,是如何执行的?
- 电脑页面不能全屏怎么办?Win11页面不能全屏的解决方法
- 九齐单片机NY8B062D单按键控制4种LED状态
- 华为nova 10系列支持应用安全检测功能 筑牢手机安全防火墙
- Hash quiz game system development how to develop hash quiz game system development (multiple cases)
- What is involution?
- Kotlin cycle control
- Practical examples of node strong cache and negotiation cache
- Stack: how to realize the judgment of valid brackets?
- [today in history] July 4: the first e-book came out; The inventor of magnetic stripe card was born; Palm computer pioneer was born
猜你喜欢

Installation and use of VMware Tools and open VM tools: solve the problems of incomplete screen and unable to transfer files of virtual machines

Aiming at the "amnesia" of deep learning, scientists proposed that based on similarity weighted interleaved learning, they can board PNAS

Flet tutorial 05 outlinedbutton basic introduction (tutorial includes source code)

Chrome development tool: what the hell is vmxxx file

电脑共享打印机拒绝访问要怎么办

Flet教程之 05 OutlinedButton基础入门(教程含源码)

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?
node强缓存和协商缓存实战示例

【深度学习】一文看尽Pytorch之十九种损失函数

ICML 2022 | Meta提出鲁棒的多目标贝叶斯优化方法,有效应对输入噪声
随机推荐
In operation (i.e. included in) usage of SSRs filter
On communication bus arbitration mechanism and network flow control from the perspective of real-time application
Optimize if code with policy mode [policy mode]
Detailed explanation of Audi EDI invoice message
同事的接口文档我每次看着就头大,毛病多多。。。
软件客户端数字签名一定要申请代码签名证书吗?
Win11亮度被锁定怎么办?Win11亮度被锁定的解决方法
电脑共享打印机拒绝访问要怎么办
Lingyun going to sea | 10 jump &huawei cloud: jointly help Africa's inclusive financial services
更强的 JsonPath 兼容性及性能测试之2022版(Snack3,Fastjson2,jayway.jsonpath)
Delete the characters with the least number of occurrences in the string [JS, map sorting, regular]
YOLOv5s-ShuffleNetV2
哈希(Hash)竞猜游戏系统开发功能分析及源码
Introduction to ACM combination counting
Template_ Large integer subtraction_ Regardless of size
Practice examples to understand JS strong cache negotiation cache
Oracle database, numbers Force 2 decimal places to display-Alibaba Cloud
解密函数计算异步任务能力之「任务的状态及生命周期管理」
【历史上的今天】7 月 4 日:第一本电子书问世;磁条卡的发明者出生;掌上电脑先驱诞生
紫光展锐完成全球首个 5G R17 IoT NTN 卫星物联网上星实测