转自: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. Supervisor-守护进程工具

    前言 手头上的服务器程序1.0版本终于要进入线上测试阶段了

  2. SpringBoot第十篇:thymeleaf详解

    作者:追梦1819 原文:https://www.cnblogs.com/yanfei1819/p/10931435.html 版权声明:本文为博主原创文章,转载请附上博文链接! 引言   Sprin ...

  3. XMLHttpRequest原生方法

    时间久了,在工作中会有很多方法和见解. 随着时间的推移,慢慢的写的代码越来越多,封装分方法也越来越多,为的是方便后续工作,加快开发效率! 与此同时,我们会相应的去找一些插件,来代替我们在开发过程中执行 ...

  4. Ansible17:Playbook之tags

    目录 简介 为task打tag 使用tag 执行指定tag的task 排除指定tag的task 查看playbook中的所有tag 打tag的几种方式 ansible内置tag 简介 在大型项目当中, ...

  5. docke通信之Linux 网络命名空间

    一.前言 namespace(命名空间)和cgroup是软件容器化(想想Docker)趋势中的两个主要内核技术.简单来说,cgroup是一种对进程进行统一的资源监控和限制,它控制着你可以使用多少系统资 ...

  6. c# 项目nuget不自动安装dll

    问题 创建的项目提交到服务器上,其他人下载项目后无法生成解决方案成功,无法自动生成dll,无法自动下载安装相应的插件 解决方案 删除packages文件夹即可,nuget就可以自动安装相关的dll了

  7. Mysql外键约束之CASCADE、SET NULL、RESTRICT、NO ACTION

    Mysql中有目前只有InnoDB引擎支持外键约束,InnoDB中外键约束定义的语法如下: ALTER TABLE tbl_name ADD [CONSTRAINT [symbol]] FOREIGN ...

  8. 在ASP.NET MVC中创建自定义模块

    创建模块 module是实现了System.Web.IHttpModule接口的类.该接口定义了两个方法: Init:当模块初始化时被调用,传入的参数为HttpApplication对象,用于注册请求 ...

  9. kkpager 实现ajax分页查询

    前台分页数据,适合数据少量的时候,因为分页的数据是从后台获取的,大数据的话不建议使用 现看前台代码: @{ Layout = null; } <!DOCTYPE html> <htm ...

  10. JS 树形结构与数组结构相互转换、在树形结构中查找对象

    总是有很多需求是关于处理树形结构的,所以不得不总结几个常见操作的写法.¯\_(ツ)_/¯ 首先假设有一个树形结构数据如下 var tree=[ { 'id': '1', 'name': '教学素材管理 ...