No it is plain old JNI right now. Project Panama looks promising for simplifying FFI layer.
01/23/2021, 8:35 AM
Hi @bjonnh, the JVM sees only the pointer to the tensor. Memory is managed through scoping mimicking what happens in native.
01/23/2021, 9:03 PM
not that this is on the wrong track but 100000 calls on a method will barely begin to trigger the hotspot. you are basically measuring the client JVM plus the overhead of the C2 compiler which might just be getting warmed up, right?
if the oracle graalvm can be used or at least the JVMCI options, or if you want to roll through millions of iterations before sampling, that is how most jvm benchmarks measure the potential.
it looks like JVMCI in the oracle graal v19 can drop 25% off of one of my single threaded unit tests, suspect is that whatever ir compilation that happens will unbox lambdas that have Array<T> parameters, boxing being the single largest profile-able expense outside of page faulting.
even with the JMVCI static eval present the iteration throughput climbs for about 10 minutes of 3-5 hours unit test
01/24/2021, 5:02 AM
Those are JMH tests. Please read about JMH and benchmarking in jvm.
01/24/2021, 12:31 PM
does jmh somehow guarantee static analysis and warmup iterations?
01/24/2021, 12:37 PM
Please do read about it. There are tons of articles about benchmarking in java. JMH does not guarantee correct results for complicated applications, but we are talking about micro-benchmarks, and it is the only way to do proper micro-benchmarks.
01/24/2021, 4:58 PM
a simple question about the warmup could be answered by numerical count of iterations. soliloquies about methodology really don't apply to a JVM benchmark showing 100k iterations.