I’m experimenting (with some friends) with JVM languages, such as Clojure and Scala. We recently found a functional solution to an algorithm that performed 30 times faster in Scala than in Java. With these functional languages, has anyone used a bytecode profiling tool to see what these functions become in JVM bytecode? What is the best tool to use for this purpose?
For that matter, as I’m just starting to look at bytecode instrumentation and profiling products, which tool is the best to use? I see recommendations on Stackoverflow, but I’m not sure if they are specifically tuned to the desire to see what machine implementation differences exist between two pieces of code, or if they are purely for code-coverage purposes, which is not my interest.
From the tool perspective, JVM languages don’t pose any different problem to profiling than plain Java bytecode. What you need is to get an understanding of how things work behind the hood of your fancy functional constructs in order to properly read the results of your profiler.
YourKit or visualVM will be then your friends again.