Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (107)
games submitted by our members
Games in WIP (536)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  VM bytecode tuning  (Read 1435 times)
0 Members and 1 Guest are viewing this topic.
Offline rreyelts

Junior Member




There is nothing Nu under the sun


« Posted 2004-10-28 18:49:14 »

Does anybody know if typical JVMs have a particular preference for dealing with slots or the operand stack? For example, if I store a reference in a slot, as opposed to duplicating it on the stack, how much more time is that going to take? (At the minimum, there is an additional load instruction or two, but will these tend to be optimized out during recompilation?)

Azeem, do you have any insight?

God bless,
-Toby Reyelts

About me: http://jroller.com/page/rreyelts
Jace - Easier JNI: http://jace.reyelts.com/jace
Retroweaver - Compile on JDK1.5, and deploy on 1.4: http://retroweaver.sf.net.
Offline Azeem Jiva

Junior Member




Java VM Engineer, Sun Microsystems


« Reply #1 - Posted 2004-10-28 20:15:54 »

Sorry no clue
Offline Jeff

JGO Coder




Got any cats?


« Reply #2 - Posted 2004-11-22 01:23:20 »

I believe Shirazi has done such opcode micr0-benchmarking.

You might check his site as it soudsn like you have one of the rare projects (byte code generators) where this is actually useful information.  Keep in mind though you'll have to track it for changes over VM versions :/

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 kcpeppe

Senior Newbie




Type safety is for the weak


« Reply #3 - Posted 2004-11-25 18:30:25 »

Quote
I believe Shirazi has done such opcode micr0-benchmarking.

You might check his site as it soudsn like you have one of the rare projects (byte code generators) where this is actually useful information.  Keep in mind though you'll have to track it for changes over VM versions :/



Ok, long time learker, first posting. I can safely say that my partner in crime has not done this type of benchmarking. I normally do that level of benchmarking and the last time that I did this was in an attempt to validate some of the tips in our tips database. I can safely say that I could not see any precevable differences between either technique.  Later on I discovered that the compiler may have "optimized" my benchmark for me... As the saying goes.. beware the microbenchmark    Grin   I still do them and I believe that they are useful but man can you get stung really badly if you're not careful.

For example, I almost blogged a 1.5 MBM that I did the other night I was in the middle of the write up and a I had a nagging question. So, I went back in and tried a twiddle with the benchmark only to discover that the alteration resulted in a 60% reduction in run time. Ran the benchmark baseline in the 1.4.2_04 only to see the same effect.

The bizzare thing is; the twiddle was the removal of a call to sleep that occured after a forced GC and these calls are made outside of the metered section of code! Furthermore, because I didn't force a full GC at controlled points, it ran during the metered portion of the code.

I'm currently wondering if the thread priority has been set in XP such that it's often interruped after sleeping. That said, I shutdown just about everything running on the machine before starting the benchmark (including explorer Smiley)

While writing this, I finished a test in W2K only to discover that the effect appears to be absent. So it would seem that this effect is a JVM/XP interaction. :-/
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #4 - Posted 2004-11-25 19:02:04 »

Quote

That said, I shutdown just about everything running on the machine before starting the benchmark (including explorer Smiley)


You mean you got rid of the startbar, the desktop, everything? Or do you just mean the IE and windows-explorer parts? (the "second-instance" bits)

I got out of NT admin around the time they introduced the "auto-restart of explorer", so never got around to discovering how you kill it and prevent it from coming back, phoenix-like, a minute later.

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

Senior Newbie




Type safety is for the weak


« Reply #5 - Posted 2004-11-26 05:20:21 »

Quote


You mean you got rid of the startbar, the desktop, everything?


Yup but don't ask me why the auto-restart doesn't
Pages: [1]
  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.

Riven (20 views)
2014-07-29 18:09:19

Riven (13 views)
2014-07-29 18:08:52

Dwinin (12 views)
2014-07-29 10:59:34

E.R. Fleming (31 views)
2014-07-29 03:07:13

E.R. Fleming (12 views)
2014-07-29 03:06:25

pw (42 views)
2014-07-24 01:59:36

Riven (42 views)
2014-07-23 21:16:32

Riven (28 views)
2014-07-23 21:07:15

Riven (29 views)
2014-07-23 20:56:16

ctomni231 (60 views)
2014-07-18 06:55:21
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
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!