Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (513)
Games in Android Showcase (121)
games submitted by our members
Games in WIP (577)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 [2]
  ignore  |  Print  
  Enhanced loop in Tiger  (Read 7532 times)
0 Members and 1 Guest are viewing this topic.
Offline Mark Thornton

Senior Duke





« Reply #30 - Posted 2004-02-28 07:27:57 »

Quote

At dev time you can copy the JDK's server VM dll folder to the JRE so that sending the following command works: java -server -version

Maybe this is what Mark meant?

Exactly. A default install of java 1.5 beta gives this in response to java -server -version

Error: no `server' JVM at `C:\Program Files\Java\j2re1.5.0\bin\server\jvm.dll'.
Offline Jeff

JGO Coder




Got any cats?


« Reply #31 - Posted 2004-03-03 02:42:11 »

Hmm.  Thats the beta.  Im not sure what that means  if anything.

AFAIK there is no intent to stop destributing the server VM with the JRE but who knwos, maybe someone thought it was a brillaitn way to reduce JRE size.

I'll poke around and see what I cna find out.

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Offline Jeff

JGO Coder




Got any cats?


« Reply #32 - Posted 2004-03-03 02:43:44 »

Umk are you guys telling me its been this way since 1.4?

Thats nutty.  I need to look into that. Thanks.


Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Bombadil

Senior Duke





« Reply #33 - Posted 2004-03-03 04:59:13 »

Quote
Umk are you guys telling me its been this way since 1.4?

Yes. :-)
You live in a nice world: no Windows PCs for years. Lucky you...
Offline Mark Thornton

Senior Duke





« Reply #34 - Posted 2004-03-03 06:11:55 »

Quote
Umk are you guys telling me its been this way since 1.4?

Since the server VM was released (1.3 ?).
You could at least make the server VM an option in the JRE install so that you don't have to download it unless you want to.
Offline princec

JGO Kernel


Medals: 409
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #35 - Posted 2004-03-03 07:07:26 »

<nagnagnag>
...or get the VM engineers to join them together and get that 2-stage compile working... Tongue
</nagnagnag>

Cas Smiley

Offline selendic

Junior Duke




Java games rock!


« Reply #36 - Posted 2004-03-03 10:14:16 »

Quote
Umk are you guys telling me its been this way since 1.4?

Thats nutty.  I need to look into that. Thanks.




Yep, there's not server VM in Windows JRE for a long time now. However, Linux 1.5.0 beta JRE has it.  Sweet.
Offline Mark Thornton

Senior Duke





« Reply #37 - Posted 2004-03-03 10:51:02 »

You mean its just the 1.5 JDK installation which doesn't copy the server vm to the JRE location? That 's just nutty.
Offline swpalmer

JGO Coder


Exp: 12 years


Where's the Kaboom?


« Reply #38 - Posted 2004-03-03 11:52:06 »

Yes it has always been the case that the server VM is not included in the "JRE" but is included in the "JDK", on Windows at least.

On Mac there currently is NO server VM at all, but the -server command line arg does change some parameters to the client VM so it behaves a bit more server like - though without any of the server VM optimizations.

Offline cfmdobbie

Senior Duke


Medals: 1


Who, me?


« Reply #39 - Posted 2004-03-04 20:28:37 »

Heh, what a mess! Grin

I'd always assumed that the reason why the server VM wasn't in the JRE was because most people wouldn't know it was there anyway - it's an easy 2MB to cut.  The minority who want the server VM are capable of getting the full JDK instead - classical client-side apps would prefer to avoid the startup cost so it's application servers et al that really benefit, and they frequently come bundled with the preferred VM.

That was always my perception, anyway.

Hellomynameis Charlie Dobbie.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline princec

JGO Kernel


Medals: 409
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #40 - Posted 2004-03-05 07:01:56 »

What annoys me is that all the performance optimism and clever compiler tricks quoted about Java are all based on the server VM. The client VM just sucks, really Sad

Cas Smiley

Offline Jeff

JGO Coder




Got any cats?


« Reply #41 - Posted 2004-03-05 07:22:59 »

Well not ALL the clever tricks, but certainly the expensive optimization ones are server only.

I still think its wacky that they too it out of the JRE. i never noticed because I ALWAYS install a JDK.

I'll do some digging on it but I suspect some brilliant person decided that "only GUI users download the JRE and they don't need server"  which as PC points out is not a good assumption.

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #42 - Posted 2004-03-05 07:52:21 »

Quote

I'll do some digging on it but I suspect some brilliant person decided that "only GUI users download the JRE and they don't need server"  which as PC points out is not a good assumption.


Perhaps related to this mess?

http://www.java-gaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=announcements;action=display;num=1078053186

It certainly seems that someone in marketing is keen to fork <*> java.

<*> (the similarity between this and another f word is rather appropriate here I think)

malloc will be first against the wall when the revolution comes...
Offline sma

Junior Duke





« Reply #43 - Posted 2004-03-08 06:38:29 »

Quote
The client VM just sucks, really Sad

That's over-generalized and therefore simply not true. Eclipse, for example, runs much better (read: faster) on a client VM than on a server VM. For whatever reason...

.: Truth Until Paradox!
Offline princec

JGO Kernel


Medals: 409
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #44 - Posted 2004-03-08 07:46:12 »

It sucks for what we want, which is high-performance games that can compete with C++ Smiley

Eclipse runs faster with the server VM - it just needs a little tuning.

Cas Smiley

Offline HamsterofDeath

Junior Duke




Java games rock!


« Reply #45 - Posted 2004-03-25 09:35:40 »

try to run this
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
public class Bench
{
   public static void main(String[] args)
   {
      long time = System.currentTimeMillis();
      int x = 0;
      for (int i = 0;i<1000000000;i++)
      {
         x+=5;
         x+=10;
      }
      System.out.println(x);
      System.out.println((System.currentTimeMillis()-time)/1000f);
   }
}

with the client and server vm (1.5). it's amazing.
time client vm : 8 seconds on a 1 ghz pentium 3.
server vm : 0.01 (!!!) seconds
Offline princec

JGO Kernel


Medals: 409
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #46 - Posted 2004-03-25 09:45:05 »

It is conceivable the server VM processes that loop completely and turns it into a single instruction...
not particularly useful in the real world maybe but you never know Smiley

Cas Smiley

Offline pepe

Junior Duke




Nothing unreal exists


« Reply #47 - Posted 2004-03-25 09:59:32 »

Maybe simply, the server vm is smart enough to remove completely the loop as the result can be calculated with a simple multiplication... that is 1000000000 * 15..... Can even add the result directly in the print statement....
I bet that if you get the loop count from... mhhh commandline, you will not get the same results in server VM.... You then finally bench the timer granularity ...

Not an amazing performance, but a nice optimization..

corrections.. can't type....

Home page: http://frederic.barachant.com
------------------------------------------------------
GoSub: java2D gamechmark http://frederic.barachant.com/GoSub/GoSub.jnlp
Offline morbo

Senior Newbie





« Reply #48 - Posted 2004-03-25 13:34:09 »

Probably has more to do with the JIT. AFAIK, the server VM is much more proactive at determining which methods it should JIT compile. Whereas the client VM waits until it actually sees a hotspot before it compiles.

Try moving the code into a method, calling it a couple of times, THEN perform the benchmark. This should give the client VM time to compile the method, if this is indeed what's happening.
Pages: 1 [2]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

theagentd (20 views)
2014-10-25 15:46:29

Longarmx (52 views)
2014-10-17 03:59:02

Norakomi (46 views)
2014-10-16 15:22:06

Norakomi (34 views)
2014-10-16 15:20:20

lcass (39 views)
2014-10-15 16:18:58

TehJavaDev (68 views)
2014-10-14 00:39:48

TehJavaDev (69 views)
2014-10-14 00:35:47

TehJavaDev (60 views)
2014-10-14 00:32:37

BurntPizza (74 views)
2014-10-11 23:24:42

BurntPizza (46 views)
2014-10-11 23:10:45
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!