Skip to content

Instantly share code, notes, and snippets.

@odekopoon
Last active September 18, 2018 04:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save odekopoon/d5fc959b170b6b395ef98f449f01e7b8 to your computer and use it in GitHub Desktop.
Save odekopoon/d5fc959b170b6b395ef98f449f01e7b8 to your computer and use it in GitHub Desktop.
【雑記】 GraalVM 1.0-RC6のAOTコンパイル

GraalVM 1.0-RC6のCE版とEE版、それぞれでnative-imageでバイナリを作ってみたが、どちらもおなじ感じだった。

動作環境は、 ”Linux or Mac OS X on x86 64-bit systems” ベースは、JDK 1.8.0_171 https://www.graalvm.org/docs/release-notes/#10-rc6 https://www.graalvm.org/downloads/

Ahead-of-time Compilation | GraalVM reference manual https://www.graalvm.org/docs/reference-manual/aot-compilation/

Substrate VM Java Limitations https://github.com/oracle/graal/blob/master/substratevm/LIMITATIONS.md

faasだと?

Serverless Native Java Functions using GraalVM and Fn Project https://medium.com/criciumadev/serverless-native-java-functions-using-graalvm-and-fn-project-c9b10a4a4859

Using GraalVM to run Native Java in AWS Lambda with Golang https://engineering.opsgenie.com/run-native-java-using-graalvm-in-aws-lambda-with-golang-ba86e27930bf

ほかの実装との比較 (うろ覚え)

Excelsior JET は 有償版は AOT/JIT併用できるたはず(xjavaコマンド?) Linux ARMv7, ARMv8(32bit mode)版もある ただ、以前触ったときにclojureなどクラスが多い場合にはJETのAOTでは、startupが遅かった記憶がある(clojureが古いためかもしれない) clojureだとコンパイル時間もかかった。 https://www.excelsiorjet.com/internals

Clojure 1.9 + GraalVMのSubstrate VMでは 0.01s @ x86 1core 1.6GHz 程度

Native Clojure with GraalVM

64bitのmacOSとlinuxだけだけど、ちょっとしたclojureのコマンドラインツールは早くなるかも

Native Clojure with GraalVM https://www.innoq.com/en/blog/native-clojure-and-graalvm/ https://www.innoq.com/en/talks/2018/09/native-clojure-clojutre-2018/

制限とか Command-line apps with Clojure and GraalVM: 300x better start-up times https://www.astrecipes.net/blog/2018/07/20/cmd-line-apps-with-clojure-and-graalvm/

A Leiningen plugin to generate GraalVM native images https://github.com/taylorwood/lein-native-image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment