aspose file tools
The moose likes Performance and the fly likes Declaring HotSpots manually? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Performance
Reply Bookmark "Declaring HotSpots manually?" Watch "Declaring HotSpots manually?" New topic
Author

Declaring HotSpots manually?

Prakash Dwivedi
Ranch Hand

Joined: Sep 28, 2002
Posts: 452
Is it possible to declare any method or portion of code as HotSpot, at compile time. So that it is executed as native code right from the begining.
thanx


Prakash Dwivedi (SCJP2, SCWCD, SCBCD)
"Failure is not when you fall down, Its only when you don't get up again"
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
No. And it probably wouldn't even help, as the Hotspot engine not only observes wether some code is a hotspot, but also analyzes how that code typically gets used, so that it can perform certain optimizations based on that data.
Why do you want to?


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Prakash Dwivedi
Ranch Hand

Joined: Sep 28, 2002
Posts: 452
thanx for the response,
the reason why i wanted to that was, in my application i have to frequently read/write on local files. just to increase performance i was wondering if i cn declare that methods as hotspot.
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
In your particular case "read/write on local files", hotspot or jit compilation doesn't help you much. Reading/writing files are cans of slimey worms where disk caches, internal buffers, I/O speed etc. rear their ugly heads.
All you can do is desing your algorithms properly so these slimey worms can be circumvented as much as possible, i.e. think about buffered I/O, buffer sizes etc. etc.
kind regards
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Declaring HotSpots manually?
 
Similar Threads
onload
build.xml question
Why we live?
Netscape7.1 and window.createPopup()
input type=file