I can’t tell which is faster, however, in more realistic deep learning experiments which typically involves larger models, Pytorch is highly comparable to the fastest frameworks. There is a lot more to benchmarking deep learning models. From an engineering perspective, consider raw java and jni, for basic tasks, the overhead of calling c code from Java via jni would cause jni to run more slowly than pure java, however, for more compute intensive tasks, jni would outperform pure java code. Hence, benchmarks must be at large scales especially in deep learning where the whole point of the GPU is to perform highly compute intensive tasks.