S2000 Vintage Owners Knowledge, age and life experiences represent the members of the Vintage Owners

Calling in the geeks

Thread Tools
 
Old Sep 30, 2008 | 03:43 AM
  #51  
boltonblue's Avatar
Thread Starter
Member (Premium)
20 Year Member
Liked
Loved
Community Favorite
 
Joined: Jul 2002
Posts: 37,547
Likes: 6,358
From: bolton
Default

Originally Posted by Traveler,Sep 30 2008, 01:33 AM
But still, 200000 to 1 makes me think that the Java program was just poorly written.
While I haven't personally reviewed any of his code and anything is possible.
This professor is pretty sharp from what I could tell.
Still even giving away 2 orders of magnitude that is still a remarkable difference in performance.
Reply
Old Sep 30, 2008 | 07:28 AM
  #52  
WhiteS2k's Avatar
Registered User
20 Year Member
 
Joined: Oct 2000
Posts: 3,827
Likes: 0
From: Bay Area
Default

Originally Posted by Traveler,Sep 29 2008, 09:33 PM
The machine code it compiles into will still be making a lot of calls to the JVM runtime to create and delete objects, ask for addresses of existing objects, make method calls, and probably much more.
Ahhh... You mean like threaded-code. Sometimes I look at the output of the C++ compiler and every other instruction is a "call" instruction. So even in the native compiled code there is a lot of jumping around to slow things down.

Anyway, here is a technique from the hardware side that can be applied to the JVM. Let's say the code is coming to a conditional branch, and we don't know in advance which way the branch is going to go (it is still waiting for the branch condition to be computed). What the HW does is to fire off two threads, one executing the true path and the other executing the false path. Once the branch condition is determined, the "good" thread is "committed" and the "bad" thread is killed. For the JVM, it could fire off two threads and start executing both paths simultaneously and then committ to the good one later. This can take advantage of multiple cores. Of course, you can extrapolate this and quickly deduce that given the frequency of conditional branches in today's code, starting two paths will quickly "branch" out to many paths and suck up all available cores. Just a thought.
Reply
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
boltonblue
S2000 Vintage Owners
4
Jun 3, 2011 01:17 AM
Lainey
S2000 Vintage Owners
4
May 15, 2008 05:20 AM
valentine
S2000 Vintage Owners
28
Feb 23, 2007 03:33 PM
jguerdat
New York - Upstate New York S2000 Owners
7
Nov 15, 2004 04:05 PM




All times are GMT -8. The time now is 10:44 PM.