Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > How to enable JIT?

Reply
Thread Tools

How to enable JIT?

 
 
Dmitriy Melnik
Guest
Posts: n/a
 
      02-21-2009
Hi everyone!
I wanna speed up the program I am creating now. I heard one way to do
it is to use JIT. Is it possible to enable it on HotSpot VM? If it is
how can I do that?
Thanks in advance.
 
Reply With Quote
 
 
 
 
Thomas Kellerer
Guest
Posts: n/a
 
      02-21-2009
Dmitriy Melnik wrote on 21.02.2009 18:47:
> Hi everyone!
> I wanna speed up the program I am creating now. I heard one way to do
> it is to use JIT. Is it possible to enable it on HotSpot VM? If it is
> how can I do that?


It's enabled by default, there is nothing you need to do.

You can only influence the threshold when bytecode gets compiled into native
code (after how many executions)

For details see:

http://java.sun.com/javase/technolog.../vmoptions.jsp



 
Reply With Quote
 
 
 
 
Arne Vajhøj
Guest
Posts: n/a
 
      02-21-2009
Thomas Kellerer wrote:
> Dmitriy Melnik wrote on 21.02.2009 18:47:
>> Hi everyone!
>> I wanna speed up the program I am creating now. I heard one way to do
>> it is to use JIT. Is it possible to enable it on HotSpot VM? If it is
>> how can I do that?

>
> It's enabled by default, there is nothing you need to do.


Not only is id enabled by default - I don't even think it can
be disabled in newer JVM's.

Arne
 
Reply With Quote
 
Dmitriy Melnik
Guest
Posts: n/a
 
      02-21-2009
On 21 ÆÅ×, 21:03, Thomas Kellerer <FJIFALSDG...@spammotel.com> wrote:
> Dmitriy Melnik wrote on 21.02.2009 18:47:
>
> > Hi everyone!
> > I wanna speed up the program I am creating now. I heard one way to do
> > it is to use JIT. Is it possible to enable it on HotSpot VM? If it is
> > how can I do that?

>
> It's enabled by default, there is nothing you need to do.
>
> You can only influence the threshold when bytecode gets compiled into native
> code (after how many executions)
>
> For details see:
>
> http://java.sun.com/javase/technolog.../vmoptions.jsp


Thanks a lot!
 
Reply With Quote
 
Dmitriy Melnik
Guest
Posts: n/a
 
      02-21-2009
So another question arouse. What VM can provide the best performance?
The matter is I am creating a cryptographic system and need it run as
fast as possible.
 
Reply With Quote
 
Arne Vajhøj
Guest
Posts: n/a
 
      02-21-2009
Dmitriy Melnik wrote:
> So another question arouse. What VM can provide the best performance?
> The matter is I am creating a cryptographic system and need it run as
> fast as possible.


I don't think the difference is that big. For newer Java versions SUN's
with -server is approx. as fast as IBM's and BEA's.

If you test with your specific code, then one of them may
be a bit faster than the other, but you may find a different
one to be faster with some other code.

Arne
 
Reply With Quote
 
Dmitriy Melnik
Guest
Posts: n/a
 
      02-21-2009
On 22 ¬æ¬Ö¬Ó, 01:38, Arne Vajh©ªj <a...@vajhoej.dk> wrote:
>
> I don't think the difference is that big. For newer Java versions SUN's
> with -server is approx. as fast as IBM's and BEA's.
>
> If you test with your specific code, then one of them may
> be a bit faster than the other, but you may find a different
> one to be faster with some other code.
>
> Arne


Thanks! I really appreciate your help.
 
Reply With Quote
 
Lew
Guest
Posts: n/a
 
      02-21-2009
Dmitriy Melnik wrote:
>>> So another question arouse. What VM can provide the best performance?
>>> The matter is I am creating a cryptographic system and need it run as
>>> fast as possible.


Arne Vajhøj wrote:
>> I don't think the difference is that big. For newer Java versions SUN's
>> with -server is approx. as fast as IBM's and BEA's.
>>
>> If you test with your specific code, then one of them may
>> be a bit faster than the other, but you may find a different
>> one to be faster with some other code.


Dmitriy Melnik wrote:
> Thanks! I really appreciate your help.


Two approaches to increase speed:
- tune the VM parameters (-server, -X and -XX options);
- throw hardware at the problem.

If your application is correctly multithreaded, then additional CPU cores can
speed things up (subject to Amdahl's Law). More memory can help to a point,
especially on 64-bit platforms. If I/O is an issue in your application,
faster disks will help. No optimization of a slow algorithm will improve
things as much as a faster algorithm, assuming equivalent correctness.

The dictum for optimization is to measure performance first, then again after
optimization attempts. Results are often counter-intuitive.

--
Lew
Please trim sigs.
 
Reply With Quote
 
Dmitriy Melnik
Guest
Posts: n/a
 
      02-21-2009
Lew wrote:
> Dmitriy Melnik wrote:
> >>> So another question arouse. What VM can provide the best performance?
> >>> The matter is I am creating a cryptographic system and need it run as
> >>> fast as possible.

> Arne Vajhøj wrote:
> >> I don't think the difference is that big. For newer Java versions SUN's
> >> with -server is approx. as fast as IBM's and BEA's.

>
> >> If you test with your specific code, then one of them may
> >> be a bit faster than the other, but you may find a different
> >> one to be faster with some other code.

> Dmitriy Melnik wrote:
> > Thanks! I really appreciate your help.

>
> Two approaches to increase speed:
> - tune the VM parameters (-server, -X and -XX options);
> - throw hardware at the problem.
>
> If your application is correctly multithreaded, then additional CPU cores can
> speed things up (subject to Amdahl's Law). *More memory can help to a point,
> especially on 64-bit platforms. *If I/O is an issue in your application,
> faster disks will help. *No optimization of a slow algorithm will improve
> things as much as a faster algorithm, assuming equivalent correctness.
>
> The dictum for optimization is to measure performance first, then again after
> optimization attempts. *Results are often counter-intuitive.
>
> --
> Lew
> Please trim sigs.


Thanks for the useful post. I've already played with VM options a
little bit. Quadratic sieve factoring algorithm runs about 10% faster
with the combination of -server and -XX:+AggressiveOpts options.

Btw, what do you mean by trimming sigs? I'm a complete newbie on
Usenet.
 
Reply With Quote
 
Thomas Kellerer
Guest
Posts: n/a
 
      02-21-2009


Arne Vajhøj wrote on 21.02.2009 19:15:
> Thomas Kellerer wrote:
>> Dmitriy Melnik wrote on 21.02.2009 18:47:
>>> Hi everyone!
>>> I wanna speed up the program I am creating now. I heard one way to do
>>> it is to use JIT. Is it possible to enable it on HotSpot VM? If it is
>>> how can I do that?

>>
>> It's enabled by default, there is nothing you need to do.

>
> Not only is id enabled by default - I don't even think it can
> be disabled in newer JVM's.


Yes you can: -Xint

http://java.sun.com/javase/6/docs/te...dows/java.html
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
How to enable people to pay me....(enable credit card payments in my web app) Patrick ASP .Net 1 11-10-2005 11:07 AM
error message when trying to enable Internet Connection Sharing =?Utf-8?B?R2FtZXJtYW41Mg==?= Wireless Networking 0 01-25-2005 04:15 AM
Adapters to Enable an hp Printer to Wireless =?Utf-8?B?YmVuZWRpY3Qx?= Wireless Networking 1 12-26-2004 01:01 AM
How to enable WPA in XP SP2 Steve Wireless Networking 1 11-10-2004 06:00 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57