Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (526)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (593)
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  
  Inlining  (Read 1345 times)
0 Members and 1 Guest are viewing this topic.
Offline swpalmer

JGO Coder


Exp: 12 years


Where's the Kaboom?


« Posted 2003-04-22 11:59:10 »

According to http://java.sun.com/docs/hotspot/VMOptions.html

-XX:+PrintInlining   might give some interesting stats... it says "(debug only)"  Does that mean a debug build of the VM?

I tried it and the option was not recognized.  Is there any way to determine if something gets inlined or not?

I'm experimenting with how different techniques might effect HotSpot.. for instance is a method any more likely to be inlined if it is declared final?  I know it doesn't have to be final to be inlined, but I would like to know if being final boosts the chances at all.  If so it might be worth making some specific methods final , but I wouldn't want to do that to my code unless there was a tangible benefit.

Offline morbo

Senior Newbie





« Reply #1 - Posted 2003-04-22 15:12:07 »

It used to be that final would help with inlining, but not since Hotspot 1.3, I believe.  Hotspot is now smart enough to consider a method for inlining as long as no other loaded classes override it (basically, no other variations of the method exist).

Short form: only use final when it makes sense from a design perspective.
Offline genepi

Senior Newbie




azerty


« Reply #2 - Posted 2003-04-22 15:30:27 »

Quote
Short form: only use final when it makes sense from a design perspective.

Shortest form: Put final everywhere and only remove it when the compiler complains Grin
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline leknor

Junior Devvie




ROCK!!!


« Reply #3 - Posted 2003-04-22 18:00:30 »

Quote
Shortest form: Put final everywhere and only remove it when the compiler complains Grin
On a side note: private methods are implicitly final becuase it is impossible to override them. Limiting visilibility as much as possible is not just a good programming practice but it allows more optimizations.

Private fields could also be optimized because their visability is known to only be the current class but I'm not specifically aware of what optimizations are applied to them.
Offline swpalmer

JGO Coder


Exp: 12 years


Where's the Kaboom?


« Reply #4 - Posted 2003-04-24 11:32:29 »

So does anyone know how to get -XX:+PrintInlining or something similar to work with a 1.4.1 or 1.4.2 beta?
Or is this ability simply not there in the released versions of HotSpot?

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.

toopeicgaming1999 (72 views)
2014-11-26 15:22:04

toopeicgaming1999 (61 views)
2014-11-26 15:20:36

toopeicgaming1999 (15 views)
2014-11-26 15:20:08

SHC (28 views)
2014-11-25 12:00:59

SHC (27 views)
2014-11-25 11:53:45

Norakomi (32 views)
2014-11-25 11:26:43

Gibbo3771 (26 views)
2014-11-24 19:59:16

trollwarrior1 (40 views)
2014-11-22 12:13:56

xFryIx (78 views)
2014-11-13 12:34:49

digdugdiggy (56 views)
2014-11-12 21:11:50
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!