Fork me on GitHub

I loved this video from the GraalVM team on benchmarking native image — I learned a ton. But the best part was the a very simple reason on why the native image compilation times are so long: it's actually doing all the work that would normally be done over hours or days by the JIT compiler, which is normally amortized. With native compilation, all that time is incurred upfront. 🤯 Neat perspective!


Other things I learned: • the best way to get your code to run fast with GraalVM (JIT or AOT) is to add it to the Renaissance benchmark — they apparently pay lots of attention to it, which is why/how lots of Scala code runs faster with GraalVM. (They seem especially vigilant about any performance regressions, too.) • Near the end of the video, they do a lot of native image / AOT vs. JIT comparisons, and AOT comes out faster in a surprisingly high % of scenarios. The surprising guidance that Dr. Thomas Wuerthinger gives is that unless your code is going to run for hours/days, AOT is the way to go. • Apparently native image code performance degrades b/c GC is Serial — G1GC is reserved for the enterprise edition Super neat seeing all this amazing work being done out in the open.

🆒 1

Interesting insights. Thanks for sharing!


Is it worth talking to someone about funding the addition of Clojure to those benchmarks, assuming they're not already present?

🤯 1

Speaking on fun GraalVM videos: here's another video that was one of the funnest videos I've seen all year: Dr. Thomas Wuerthinger (again) with Dr. Fabio Niephaus , another person on the GraalVM team, who owns Squeak Smalltalk implementation in Truffle. This is a wild video showing how they're using Smalltalk to interact with Python, R, Ruby, reflecting and interacting with all of those object, rendering it inside of Squeak. Oh, and they also interoped with Espresso, the Java implementation running inside of Truffle, which @borkdude mentioned some months ago. I'm learning Smalltalk right now with @ericnormand , and I think it'd be super fun eventually to do Clojure interop. (I love that they seem quite aware of the Clojure community, no doubt b/c of @borkdude and other's interactions with them.)


One of the cool things in the video is how Thomas showed at the top the internal GraalVM statistics, specifically the length of the compile queue! You can see it at the top of the image in red, above the top right Tetris image. It's so cool to see his reactions of interacting with GraalVM as a dynamic, interactive environment —  Lots of neat engineering going on at Oracle Labs!


Here's the Graal Queue size.


here's the link to the video since I couldn't seem to find it in the tweet,


Ah, thank you. It was in the reply to that tweet — thanks for clarifying! Let me know what you think of it! 🙂


doh! not sure why I didn't see it there! anyway, the video was super interesting. Building the sort of environment demo'd in the video is the reason I've been working on membrane. I think we can build a better version in clojure! Some random notes: • the inspector they use is similar to the many REBL-like tools that are improving quickly (eg. REBL, portal, reveal, cider-inspect etc). I do think they inspector is better integrated with the dev environment generally. For example, their inspector is in-process compared to something like portal which is connected to the dev environment over a wire. • It was really impressive that the demo was driven by someone that's unfamiliar with the environment! • It's hard to tell from the video, but it seems like the code editor in the environment is less well polished than what you might expect from a "normal" code editor. It seems crazy to me that it doesn't use a monospace font. • The demoer ended the experience with wanting to try and find ways to use it in their workflow more broadly. That's great! This kind of dev environment could be a killer app to get more people to try clojure. • I'm curious what it would like to watch someone build something like the tetris example would look like. • I think there are some straightforward ways to integrate some


would love to hear what other people think


clojure.inspector :)


It's nice that clojure.inspector is builtin, but it's missing lots of features compared to alternatives


It was a joke ;)

😳 1
😆 1

Thanks for sharing @genekim! Will put those videos on my to-watch queue!