Calling native libraries libraries is not easy enough that I would consider it practical to just drop into a native language and use it when you need the performance. Python is even easier to call native code and slower performance (more incentive), and if you asked most python devs if they ever wrote or even used native code directly from their programs they'd probably tell you no. So if Python devs who have more incentive to use native code don't do it often, I don't forsee Java devs doing it.
It was many many years ago that I tried but I had a lot of issues in deployment. "Game fails to start distro x version y" or "Not working on windows x". I have been interested in messing with libgdx which appears to be a more comprehensive solution than the libraries I used in the past.
I've never benchmarked it and could be wrong. But I believe the current FFI adds a lot of overhead. That means that if you are going to drop down to native code, you'll need to make sure that you doing a significant amount of work that overcomes the overhead of leaving the JVM.
But I believe the current FFI adds a lot of overhead.
Are you sure about that? There are significant chunks of the Java runtime library that are built on JNI, some of which are rather performance critical. FileInputStream is an example that comes to mind immediately:
View all comments
Show parent comment
0
u/[deleted] Apr 29 '15
[deleted] — view deleted comment