OCCRA
Go to Post I love math... :D - Eric W. Jones [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Events   CD-Media   CD-Spy   FRC-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 09-05-2009, 04:15 PM
nickmagus's Avatar
nickmagus nickmagus is offline
Registered User
AKA: Nick Clayton
FRC #0008 (Paly Robotics)
Team Role: Programmer
 
Join Date: Dec 2007
Rookie Year: 2007
Location: Palo Alto, Califorinia
Posts: 56
nickmagus is an unknown quantity at this point
Send a message via AIM to nickmagus
Java vs. C++

I love java. it is a nice high level programming language and the way the VM works is both cool and great. But java is a slow language and I don't know about other teams but optimization was an issue for us this year. I see that the java library for FIRST uses a light weight JVM my question is does anybody know whether or not this will be close enough to as fast as C++ to make programming in java worth it?
  #2   Spotlight this post!  
Unread 09-05-2009, 05:33 PM
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 : 09-05-2009 at 05:35 PM.
  #3   Spotlight this post!  
Unread 09-05-2009, 05:55 PM
bobwrit's Avatar
bobwrit bobwrit is offline
//No Comment
AKA: ...
FRC #1977 (Loveland High Robotics)
Team Role: Alumni
 
Join Date: Oct 2008
Rookie Year: 2008
Location: Somewhere
Posts: 298
bobwrit is just really nicebobwrit is just really nicebobwrit is just really nicebobwrit is just really nicebobwrit is just really nice
Re: Java vs. C++

I can't say anything about SJVM, but from what I've noticed and timed on my own computers, java is slower to load, but once it's loaded, it's slightly faster that C/C++. I'm not going to worry too much about the performance of Java on the cRio. Like alivemyst said, It's personal preference as to which one you use.
__________________

FRC Team 1977 Alumni

Has Attended:2008 Colorado regional
2009 Colorado Kickoff
2009 Colorado Regional
2010 Colorado Kickoff
2010 Colorado Regional




The most exciting phrase to hear in science, the one that heralds new discoveries, is not "Eureka!"(I found it!), but rather, "Hmm.... That's funny" ---Isaac Asimov
Chance favors the prepared mind ---Louis Pasteur
And you can tell me, that I can't make a diffrence because I'm just one, but one is all it takes to start it. And you can tell me, that I can't change the world because I'm too young, but I wont stand here and be your target. ---FM Static
  #4   Spotlight this post!  
Unread 09-05-2009, 06:23 PM
Jared Russell's Avatar
Jared Russell Jared Russell is offline
I feel better now.
AKA: Jared341
FRC #0254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 2,639
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
Re: Java vs. C++

Quote:
Originally Posted by nickmagus View Post
I love java. it is a nice high level programming language and the way the VM works is both cool and great. But java is a slow language and I don't know about other teams but optimization was an issue for us this year. I see that the java library for FIRST uses a light weight JVM my question is does anybody know whether or not this will be close enough to as fast as C++ to make programming in java worth it?
What were you doing that made optimization an issue?

About the only thing that FIRST robots can do that will seriously tax a micro controller is image processing...but the NI vision libraries are highly optimized native code. Whether from LabView, C++, or Java, a call to an NI vision function takes the same amount of time.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
**FIRST EMAIL**/Java and Orbit Balls *****JAVA DISCUSSION*** Pjohn1959 Programming 37 08-31-2009 02:55 PM
Programming with Java? the_innovator Programming 11 02-27-2007 03:47 PM
java to pbasic nzj1 Programming 11 01-09-2003 06:24 PM
Java Books Yan Wang Programming 1 12-27-2002 03:26 PM
No Java for XP Kyle Fenton Chit-Chat 21 07-23-2001 07:15 PM


All times are GMT -5. The time now is 08:49 PM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi