| Author |
Just JAVA book - Performance questions
|
Alvin chew
Ranch Hand
Joined: Jan 08, 2004
Posts: 834
|
|
|
hi, peter, as author point of you, how's the performance of tiger as compare java1.4 ?
|
 |
Pradeep bhatt
Ranch Hand
Joined: Feb 27, 2002
Posts: 8876
|
|
|
My opinion - Java Tiger has some features which impact performance for e.g. autoboxing.
|
Groovy
|
 |
Ilja Preuss
author
Sheriff
Joined: Jul 11, 2001
Posts: 14112
|
|
Originally posted by Pradeep Bhat: My opinion - Java Tiger has some features which impact performance for e.g. autoboxing.
Only if you don't understand how it works. If you use it wisely, it is "just" syntactic sugar for code that otherwise you had to code manually, anyway.
|
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
|
 |
Peter van der Linden
author
Ranch Hand
Joined: Sep 28, 2004
Posts: 46
|
|
Hi Alvin, Good to hear from you with that great question. And hello to Pradeep, who points out that some new features (primarily auto-boxing/unboxing) take cycles at run time. As people may know, boxing is a convenience feature that automatically converts between a primitive type (like int) and its corresponding wrapper type (java.lang.Integer) when the context demands it. It is there to make it easier and quicker to write code like: Instead of l.add( new Integer(36) ); But those wrapping operations don't go away just because the programmer doesn't have to write them any longer. The compiler actually inserts them implicitly for you. So it costs the same as before, but you just don't see it. How much does it cost? I have a small section devoted to that on p56 called "Performance Implications of AutoBoxing". Now, looking at the other side of the equation, there have been some stunning improvements in desktop speed introduced with Java 5. I am thinking here of class data sharing. This technique was originally developed by Apple for their Java compiler (and have you noticed how much innovation of all kinds takes place in Apple? Keep your eye on *that* ball!). This technique maps most of the run time library into the JVM as a single memory image rather than a series of loads of class files. Memory mapped I/O is the fastest kind of I/O there is, but it is not widely used outside systems programmers, probably because a lot of application programmers are not yet familiar with the API. This technique (memory mapped IO for the run time library) doesn't take any work on the part of application programmers but we will all see the benefit with faster Java start-up times. I am very anxious to see the benchmarks for the final version of Java 5, shipping tomorrow if all goes well. I think we will see some real speed-ups for desktop apps. I use that excellent Karsten Lentzsch Java freeware JDiskReport ALL the time. You can find it at: http://www.jgoodies.com/index.html That is quality software written by a real Java expert. It will be interesting to see how the performance improves with Java 5! Cheers, Peter
|
Author of <a href="http://www.amazon.com/exec/obidos/ASIN/0131482114/ref=jranch-20" target="_blank" rel="nofollow">Just Java(TM) 2 (6th Edition)</a>
|
 |
Alvin chew
Ranch Hand
Joined: Jan 08, 2004
Posts: 834
|
|
hi, i have test on JDiskReport, it really fast ~~ superb JAVA
|
 |
 |
|
|
subject: Just JAVA book - Performance questions
|
|
|