• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 16. Java > Why It's Getting Better

16.3. Why It's Getting Better

In early 1997, Java's performance lagged C/C++ by a factor of 10 to 20, depending on the application. Now, at least some runtime environments are running Java as fast as they run C. InfoWorld has verified a report by Cats Software in Palo Alto that Java was only 4% to 10% slower than Microsoft's Visual C++ in a differential equation package.

Before we go into the reasons for the improvements, note that the current performance is quite acceptable for many applications. Java first became popular on the client side, in a web browser, manipulating GUI components. Java does this just fine: it may take 100 milliseconds rather than 10 milliseconds to change the GUI in response to a click or keystroke, but since both are faster than ordinary human perception, the time difference doesn't matter. Furthermore, as CPUs continue to increase exponentially in power, not only GUI operations, but all common computing operations will have performance rates that are indistinguishable, in human terms, from that of native code. Also, certain fundamental operations like arithmetic and string manipulation are implemented directly in the VM rather than in the Java class libraries that ship with the VM. Since the VM is usually written in C and optimized for a specific platform, these operations are already in native C.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint