Fork me on GitHub
Adam Helins08:07:03

Has anyone tried using Criterium in a native image? Does it makes sense?


@adam678 To measure performance?


The new 21.2 version also supports some flight recorder things now I saw in a screencast, could perhaps also be useful? dunno

Adam Helins09:07:25

Yes but as a feature for users, provide a sense of how expensive an operation is (eg. parsing some text).

Adam Helins09:07:03

So I have to rely on a library but Criterium is pretty JVM specific. Yet it tries to take care of things that might apply in a native image (eg. GC)


what I usually do is profile in a JVM and try to make things as fast as possible and pray that it will also be faster within a native-image

👍 4

sometimes optimizations have an effect in the JVM but GraalVM is sometimes moar clever so they don't have any effect, but sometimes they do

Adam Helins09:07:41

It's for that distributed Lisp I'm working on. I managed to build a native image of the runner written in Clojure (thanks BB for the inspiration!) and I thought it would be interesting providing benchmark utils.

Adam Helins09:07:26

It's not for my own benchmarking, it's a feature that users might use, built in the native image 🙂

🆒 5