• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Just JAVA book - Performance questions

 
Ranch Hand
Posts: 834
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi, peter, as author point of you, how's the performance of tiger as compare java1.4 ?
 
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My opinion - Java Tiger has some features which impact performance for e.g. autoboxing.
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
author
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Alvin chew
Ranch Hand
Posts: 834
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi, i have test on JDiskReport, it really fast ~~ superb JAVA
 
reply
    Bookmark Topic Watch Topic
  • New Topic