转自: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的更多相关文章

  1. Spring Native 项目,把 Spring 项目编译成原生程序!

    Spring Native 是什么 优点 缺点 原生镜像(native image)和常规 JVM 程序的区别 前置条件:GraalVM 支持的语言 关键特性 GraalVM 下的 Java 微服务 ...

  2. Spring Native实战(畅快体验79毫秒启动springboot应用)

    欢迎访问我的GitHub https://github.com/zq2599/blog_demos 内容:所有原创文章分类汇总及配套源码,涉及Java.Docker.Kubernetes.DevOPS ...

  3. spring native 初体验实现 小米控制美的空调

    目前关于 spring native 分享的文章还比较少 写这篇文章的主要目前是分享一下自己写的一个 小米控制美的空调 的程序 集成 spring native 过程中碰到的一些问题和解决方法 先放地 ...

  4. graalvm native image 试用

    graalvm 提供的native 模式,可以加速应用的启动,不同可以让应用不再依赖jvm 运行时环境,但是 也有一些限制 参考 https://github.com/oracle/graal/blo ...

  5. Solon 1.5.67 发布,增加 GraalVm Native 支持

    Solon 已有120个生态扩展插件,此次更新主要为细节打磨: 添加 solon.extend.graalvm 插件,用于适配 graalvm native image 模式 从此,solon 进入 ...

  6. 译文:在GraalVM中部署运行Spring Boot应用

    GraalVM是一种高性能的多语言虚拟机,用于运行以JavaScript等基于LLVM的各种语言编写的应用程序.对于Java应用也可作为通常JVM的替代,它更具有性能优势.GraalVM带来的一个有趣 ...

  7. 【译】GraalVM—下一代JVM介绍

    原标题:GraalVM – an introduction to the next level JVM 随着Red Hat宣布Quarkus作为- 为GraalVM和HotSpot量身定制的下一代Ku ...

  8. 通过 GraalVM 将 Java 程序编译成本地机器码!

    前言 2018年4月,Oracle Labs新公开了一项黑科技:Graal VM. 这是一个在HotSpot虚拟机基础上增强而成的跨语言全栈虚拟机,可以作为"任何语言"的运行平台使 ...

  9. Windows下使用Graalvm将Javafx应用编译成exe

    1 背景 Graalvm是Oracle推出的一款新型虚拟机,其中一个吸引人的功能是:它可以将Java代码编译成各个平台的本地代码,这些平台包括:linux.macOS.windows.iOS.andr ...

随机推荐

  1. laravel框架中超实用的功能介绍

    本篇文章给大家带来的内容是关于laravel框架中超实用的功能介绍,有一定的参考价值,有需要的朋友可以参考一下,希望对你有所帮助. 让lumen的dd() dump()像laravel一样优雅 1 c ...

  2. IEEE Fellow 何海波

    IEEE Fellow 何海波 11月21日,全球最大的非营利专业技术学会IEEE(电气与电子工程师协会)公布了2018年度新当选Fellow(会士)名单,我校校友何海波教授入选. 何海波,美国罗德岛 ...

  3. 【leetcode-152】 乘积最大子序列

    给定一个整数数组 nums ,找出一个序列中乘积最大的连续子序列(该序列至少包含一个数). 示例 1: 输入: [2,3,-2,4]输出: 6解释: 子数组 [2,3] 有最大乘积 6.示例 2: 输 ...

  4. 「福利」Java Swing 编写的可视化算法工程,包含树、图和排序

    之前在整理<学习排序算法,结合这个方法太容易理解了>这篇文章时,发现了一个用 Java Swing 编写的可视化算法工程,真心不错!包含了常用数据结构和算法的动态演示,先来张图感受下: 可 ...

  5. C#工具类MySqlHelper,基于MySql.Data.MySqlClient封装

    源码: using System; using System.Collections.Generic; using System.Linq; using System.Text; using Syst ...

  6. juc包下四大并发工具

    juc.CountDownLatch 闭锁 一个线程在等待一组线程后再恢复执行 await()等待其他线程执行完毕 被等待线程执行完毕后计数器-1 如何知道其他线程执行完了? 计数器,若一组线程为,C ...

  7. python 动态创建变量 获取变量名

    参考链接:https://www.cnblogs.com/technologylife/p/9211324.html 参考链接(未)(使用inspect 获取变量名):https://blog.csd ...

  8. Spring IOC 复习

    Inversion of Control 将创建对象的权利交给框架,包括DI(Dependency Injection,依赖注入)和DL(Dependency Lookup,依赖查找),能削减计算机程 ...

  9. Java自学-I/O 字符流

    Java的字符流 Reader Writer Reader字符输入流 Writer字符输出流 专门用于字符的形式读取和写入数据 步骤 1 : 使用字符流读取文件 FileReader 是Reader子 ...

  10. 联盟链IBM的超级账本Hyperledger Fabric框架,JP Morgan’s Quorum

    联盟链IBM的超级账本Hyperledger Fabric框架,JP Morgan’s Quorum JP Morgan’s Quorum https://www.coindesk.com/jpmor ...