Does it make sense in terms of better performance to build a LRU type cache in C/C++ and get java to access it via JNI ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Doubtful
JVMs do quite a decent job these days, especially considering that any applications that need a cache would probably stay up long enough for the JVM to optimise it quite a bit. Whatever your cache code would gain in speed by avoiding the JVM, you would probably lose pushing objects back and forth through JNI.
Not to mention the inherent development, maintenance and deployment difficulties of C++ code when compared with Java. Or the dangers of reinventing the wheel by rolling out your own cache – there has to be something out there that you could use instead of rolling out your own.