Go to Post FIRST prides itself on safety. It shouldn't be limited to only the pit area. - sanddrag [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 15-11-2009, 13:33
manderson5192 manderson5192 is offline
Registered User
AKA: Matt Anderson
FRC #0948 (Newport Robotics Group: NRG (pronounced eNeRGy))
Team Role: Programmer
 
Join Date: Jan 2008
Rookie Year: 2007
Location: Bellevue, WA
Posts: 62
manderson5192 is on a distinguished road
Re: C++ vs. Java Performance

2) Interesting...On the USFIRST.org beta testing forums, team 67 posted this:

Quote:
the almost-empty loops we've timed run about 50 times faster in C++ than in Java.
Is there really no noticeable performance hit?

...and a couple, related question:

4) How does the Java vision API compare to the C++ one? Is there a large speed difference?

5) After having beta tested in java, will your team use it this year?

6) When do you think everything will be released for us non-beta-testers?

Thanks again!
-Matt
Reply With Quote
  #2   Spotlight this post!  
Unread 15-11-2009, 13:50
Abrakadabra Abrakadabra is offline
Here We Go !!!
AKA: Scott Kukshtel, Mr. K
FRC #3467 (The Windham Windup!)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2002
Location: Windham, New Hampshire
Posts: 159
Abrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant future
Re: C++ vs. Java Performance

Quote:
Originally Posted by manderson5192 View Post
2) Interesting...On the USFIRST.org beta testing forums, team 67 posted this:

"the almost-empty loops we've timed run about 50 times faster in C++ than in Java. "

Is there really no noticeable performance hit?

...and a couple, related question:

4) How does the Java vision API compare to the C++ one? Is there a large speed difference?
...
I'm not a Beta tester, but I did talk with Brad Miller (father of WPILib) at RiverRage, and he spoke to two of your questions:

Re: Performance - Yes, C++, which compiles down to native machine code is always going to be faster than Java in pure speed tests, because Java has to take the extra step through the virtual machine. However, for our application, most (if not all) of the time-critical pieces are done in the FPGA libraries, where the JVM isn't a factor.

Re: Vision libraries - the vision processing code remains in C++, and is accessed in Java via wrappers that use the JNI (Java Native Interface), so again, there is no Java performance penalty involved.

HTH.
Reply With Quote
  #3   Spotlight this post!  
Unread 15-11-2009, 17:47
Jared Russell's Avatar
Jared Russell Jared Russell is offline
Taking a year (mostly) off
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,077
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: C++ vs. Java Performance

Quote:
Originally Posted by manderson5192 View Post
2) Interesting...On the USFIRST.org beta testing forums, team 67 posted this:



Is there really no noticeable performance hit?

...and a couple, related question:

4) How does the Java vision API compare to the C++ one? Is there a large speed difference?

5) After having beta tested in java, will your team use it this year?

6) When do you think everything will be released for us non-beta-testers?

Thanks again!
-Matt
I would argue that an empty loop hardly makes for a meaningful speed test. But yes - perfectly written Java will almost always lose in a performance test against perfectly written C++. But to Java's credit, it is often easier to write good Java than it is to write good C++, which can tip the scales back in Java's favor. Regardless, FIRST robots really don't tend to do anything all that computationally complicated.

4) None at all as far as I can tell. It's the same code running underneath it all.

5) Definitely - it is much more accessible to our students than C++.

6) Not sure. "Soon" seems to be the general consensus. Definitely in advance of build season.

Last edited by Jared Russell : 15-11-2009 at 19:37.
Reply With Quote
  #4   Spotlight this post!  
Unread 15-11-2009, 19:15
manderson5192 manderson5192 is offline
Registered User
AKA: Matt Anderson
FRC #0948 (Newport Robotics Group: NRG (pronounced eNeRGy))
Team Role: Programmer
 
Join Date: Jan 2008
Rookie Year: 2007
Location: Bellevue, WA
Posts: 62
manderson5192 is on a distinguished road
Re: C++ vs. Java Performance

Thanks for the help, guys! At this point, it sounds like team 948 will be going java as well =D.
Reply With Quote
  #5   Spotlight this post!  
Unread 04-12-2009, 19:28
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 588
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
Re: C++ vs. Java Performance

Quote:
Originally Posted by manderson5192 View Post
2) Interesting...On the USFIRST.org beta testing forums, team 67 posted this:

...and a couple, related question:

4) How does the Java vision API compare to the C++ one? Is there a large speed difference?
The Java vision stuff is actually written in C++ for high performance. In Java you refer to pointers to C++ image objects to make sure that there are no slowdowns due to any complex image processing that needs to get done.

Quote:
6) When do you think everything will be released for us non-beta-testers?
Yesterday
Quote:
Thanks again!
-Matt
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
Reply With Quote
  #6   Spotlight this post!  
Unread 05-12-2009, 18:18
Dragonos's Avatar
Dragonos Dragonos is offline
Web Master/ Engineer/ Programer
AKA: Eric G.
FRC #0095 (The Grasshoppers)
 
Join Date: Jan 2008
Rookie Year: 2007
Location: Upper Valley NH
Posts: 16
Dragonos is an unknown quantity at this point
Re: C++ vs. Java Performance

Where can I download it?
__________________


PM me for 3dsMax Help!
Reply With Quote
  #7   Spotlight this post!  
Unread 05-12-2009, 20:01
derekwhite's Avatar
derekwhite derekwhite is offline
Java Virtual Machine Hacker
no team (FIRST@Oracle)
Team Role: Programmer
 
Join Date: May 2009
Rookie Year: 2009
Location: Burlington, MA
Posts: 127
derekwhite is on a distinguished road
Re: C++ vs. Java Performance

See Bill's Blog for the release announcement:

http://frcdirector.blogspot.com/2009...ot-bill-2.html
Reply With Quote
Reply


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 31-08-2009 15:55
Image processing and performance ellisk C/C++ 6 20-01-2009 16:48
AndyMark Performance Wheels ChuckDickerson Technical Discussion 49 27-12-2006 18:49
Globe Motor - Performance at Cursor Katie Reynolds Motors 1 19-01-2006 20:48


All times are GMT -5. The time now is 09:29.

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


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