Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Declaring HotSpots manually?

 
Prakash Dwivedi
Ranch Hand
Posts: 452
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Prakash Dwivedi
Ranch Hand
Posts: 452
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!