Thread: Java vs. C++
View Single Post
  #1   Spotlight this post!  
Unread 05-09-2009, 18:33
alivemyst alivemyst is offline
Registered User
no team
 
Join Date: Sep 2009
Location: California
Posts: 10
alivemyst is a glorious beacon of lightalivemyst is a glorious beacon of lightalivemyst is a glorious beacon of lightalivemyst is a glorious beacon of lightalivemyst is a glorious beacon of lightalivemyst is a glorious beacon of light
Re: Java vs. C++

the Squawk Java virtual machine was developed at Sun Microsystems labs specifically for use in embedded platforms, and having used it on arm platforms, I must say it runs particularly fast--comparable to writing C++ for the same platforms. This is the case in part because Squawk runs "on the metal", ie without a host operating system to create overhead or incur performance costs. On many platforms, java now runs as fast or faster than C/C++, except when OS-Related I/O functions are called, tending to be the biggest bottleneck. On the metal, this is a non-issue, and the Java interpreter has been really well optimized. Finally, I'd point out that Java's garbage collector is rather nice...

In terms of library support, it is currently looking like the Java abstractions provided by WPI/Sun for robot hardware are rather nice... http://livemyst.comli.com/wpilibj/doc/index.html shows that most robot hardware can be dealt with cleanly through object methods.

There is nothing to say that C++ or Java is bad or should be avoided, its really more of a preference call, not performance.

Last edited by alivemyst : 05-09-2009 at 18:35.