|
Re: Java versus C++
As far as I know, Squawk (or any other J2ME implementation I've heard about) doesn't support JIT, so cRIO-java is stuck in interpreted mode. This likely ends up slowing down any particularly intensive logic-only calculations due to the lack of native code execution. One of the biggest speed boosts in desktop Java (and some other loosely Java-based systems like Android) are JIT-related. For some context, the JIT support added to Android in the latest release gave it around a 50% speed boost.
Overall, though, the cRIO is powerful enough to accommodate basically anything we'll need to do with our bots. Maybe Vision-related stuff would suffer a slowdown, but for the most part that's offloaded to (prebuilt) native libraries.
Having used Java this year, I can say that there were a few performance-related issues, but a lot of them were due to us having a pretty large number of simultaneous threads running (one being unused vision processing which happily ate away at our CPU time). In the end, a quick sweep through some of the unused code cleared it up. And it definitely won't stop us from using Java again this year - the issues we had there were nothing compared to our trouble with LabVIEW and C++ in '09.
__________________
FRC-DB: A detailed, web-based scouting database for FRC teams with lots of interesting statistics.
|