Native Clojure with GraalVM
转自:https://www.innoq.com/en/blog/native-clojure-and-graalvm/
GraalVM is a fascinating piece of technology. This newly-released just-in-time compiler allows efficient execution and interoperability between various programming languages on top of the JVM. Its impact on the execution speed is stunning. Benchmarks comparing Graal-based TruffleRuby to other Ruby implementations give us a hint of Graal’s potential. Speed benefits aside, the new compiler also allows us to translate our JVM bytecode into small self-contained native binaries.
And that’s just the tip of the iceberg. Needless to say, I am excited about it.
Minimal viable native binary
In a recent article my workmate Ruben Wagner discussed how Graal allows us to shrink Docker containers running our Java applications. Not only did he reduce the size of his images to 10 MB, but also made them consume less than a megabyte of RAM at runtime. On top of that, Graal allowed him to significantly speed up the startup of his Java applications.
Encouraged by his experiments, I attempted to adapt his approach to another JVM-based language, albeit a far more dynamic one: Clojure. Just like Java, this modern Lisp can be compiled ahead-of-time to *.class files consisting of JVM bytecode. Consider the simple namespace below.
(ns io.innoq.clojure.hello
(:gen-class))
(defn -main []
(println "
Native Clojure with GraalVM的更多相关文章
- Spring Native 项目,把 Spring 项目编译成原生程序!
Spring Native 是什么 优点 缺点 原生镜像(native image)和常规 JVM 程序的区别 前置条件:GraalVM 支持的语言 关键特性 GraalVM 下的 Java 微服务 ...
- Spring Native实战(畅快体验79毫秒启动springboot应用)
欢迎访问我的GitHub https://github.com/zq2599/blog_demos 内容:所有原创文章分类汇总及配套源码,涉及Java.Docker.Kubernetes.DevOPS ...
- spring native 初体验实现 小米控制美的空调
目前关于 spring native 分享的文章还比较少 写这篇文章的主要目前是分享一下自己写的一个 小米控制美的空调 的程序 集成 spring native 过程中碰到的一些问题和解决方法 先放地 ...
- graalvm native image 试用
graalvm 提供的native 模式,可以加速应用的启动,不同可以让应用不再依赖jvm 运行时环境,但是 也有一些限制 参考 https://github.com/oracle/graal/blo ...
- Solon 1.5.67 发布,增加 GraalVm Native 支持
Solon 已有120个生态扩展插件,此次更新主要为细节打磨: 添加 solon.extend.graalvm 插件,用于适配 graalvm native image 模式 从此,solon 进入 ...
- 译文:在GraalVM中部署运行Spring Boot应用
GraalVM是一种高性能的多语言虚拟机,用于运行以JavaScript等基于LLVM的各种语言编写的应用程序.对于Java应用也可作为通常JVM的替代,它更具有性能优势.GraalVM带来的一个有趣 ...
- 【译】GraalVM—下一代JVM介绍
原标题:GraalVM – an introduction to the next level JVM 随着Red Hat宣布Quarkus作为- 为GraalVM和HotSpot量身定制的下一代Ku ...
- 通过 GraalVM 将 Java 程序编译成本地机器码!
前言 2018年4月,Oracle Labs新公开了一项黑科技:Graal VM. 这是一个在HotSpot虚拟机基础上增强而成的跨语言全栈虚拟机,可以作为"任何语言"的运行平台使 ...
- Windows下使用Graalvm将Javafx应用编译成exe
1 背景 Graalvm是Oracle推出的一款新型虚拟机,其中一个吸引人的功能是:它可以将Java代码编译成各个平台的本地代码,这些平台包括:linux.macOS.windows.iOS.andr ...
随机推荐
- cv2.putText,cv2.rectangle方法
常用方法:cv2.putText(img,xy,(x1,y1), cv2.FONT_HERSHEY_PLAIN, 2, (0, 0, 255), thickness=2)img:要作用的图片xy:显示 ...
- HTML5网页上播放mp4失败的原因
HTML5先网页直接打开mp4 如果打不开 先用格式工厂转化下格式 转成mp4 avc编码 就行了 ps:ae要先导出mp4 然后再用上面的方法 不要导出avi 不然转化成 avc也是播放不了
- Rollup 配置 es6 环境
前 为了可以使用新型的语法,顺便在兼容下老的浏览器,所以需要自己搭建个环境,目前我个人推崇使用 rollup,主要喜欢它的 tree-shake,打包出来的代码真的很简洁. 配置 rollup.con ...
- Fiddler抓包工具怎么设置HTTPS抓包
最近在学习使用 Fiddler 抓包工具时遇到一个问题,Fiddler 默认只对 HTTP 协议进行抓包,如果出现下图提示,则需要进行相应设置才可以抓包HTTPS 具体步骤 ①:Tools-Optio ...
- C#中$拼字符串
除了Format,StringBuilder,+方式拼字符串外,有一种比较直观的拼字符串方式,代码如下 static void Main(string[] args) { string name = ...
- 【07】Kubernets:资源清单(控制器 - DaemonSet)
写在前面的话 前面讲解了 Pod / ReplicaSet / Deployment 的资源清单,我们这里谈一下 DaemonSet 的资源清单. 之前说过,DaemonSet 控制器能够保证资源在每 ...
- python正确使用异常处理机制
一.不要过度使用异常 不可否认,Python 的异常机制确实方便,但滥用异常机制也会带来一些负面影响.过度使用异常主要表现在两个方面: 把异常和普通错误混淆在一起,不再编写任何错误处理代码,而是以简单 ...
- TCP的三次握手过程?为什么会采用三次握手,若采用二次握手可以吗
谢希仁版<计算机网络>中的例子: "已失效的连接请求报文段”的产生在这样一种情况下: client发出的第一个连接请求报文段并没有丢失,而是在某个网络结点长时间的滞留了,以致延误 ...
- 1-RocketMq 学习 中文文档(一)
原文:https://blog.csdn.net/weixin_40533111/article/details/84451096 1.基本概念及优势 rocketmq是一个基于发布订阅队列模型的消息 ...
- Linux磁盘分区(9)
分区的基础知识: 模式:mbr分区: 1.最多支持四个主分区 2.系统只能安装主分区 3.扩展分区要占一个主分区 4.MBR最大只支持2TB,但拥有最好的兼容性 gtp分区: 1.支持无限多个主分区( ...