Java performance improvements touted

Technologists acknowledge previous shortcomings but point out that Java's performance now equals or tops apps developed in C

Java is not the slowpoke of old days and performance now matches or exceeds applications developed in C, technologists stressed Wednesday during a presentation at TheServerSide Java Symposium in Las Vegas.

Java Virtual Machines and garbage collection, for example, have improved and Java itself has come along way, the technologists argued. Early Java Virtual Machines were indeed slow, said Brian Goetz, Sun senior staff engineer. But that has changed.

"The reality is, Java is pretty fast these days," Goetz said. Java performance now measures up to C but lags behind in memory consumption, he said.

He and Cliff Click, chief JVM architect at Azul Systems, looked to debunk several myths, such as object allocation being slow. "This was one of those things that was absolutely true a long time ago," said Goetz. Garbage collection also was slow because it had to stop programs, trace the heap, and look for objects to discard. "It's not surprising in the early days people came to the conclusion that memory management in Java was really intensive," he said.

Another myth is that synchronization is slow. But changes have been made such as better locking algorithms, said Goetz. He also noted the continued perpetuation of the myth that Java programs spend 20 percent of their time in garbage collection, a belief traced to a paper written in 1995.

An attendee concurred about Java's performance. "We run a huge J2EE application, and we meet all our service-level agreements all the time," said Jerald Nielson, of Accenture. The program is an automated welfare system for the state of California, he said.

Java has gotten better because of incremental improvements, Click said after the session. "The garbage collection's definitely gotten better, the JIT's (Just in Time compiler) gotten better, the runtime's gotten better, a lot of things have gotten better," Click said.

Java also enjoys a 10-times performance advantage over interpreted scripting languages like JavaScript, Perl and Python, he said. "The scripting languages aren't JIT-ted yet," he said.

Scripting languages are ideal for smaller programs but Java is the choice for larger programs, he said. "As your program grows in size, the lack of strong typing basically kills your ability to handle a very large program and so you don't find the million-line Perl program," he said. One-million-line Java programs are plentiful, Click said. Strong typing refers to the capability of knowing the type of memory objects.

Also during the symposium Wednesday, Neal Ford, senior application architect at ThoughtWorks, spoke of DSLs (domain-specific languages) as a way to simplify programming. A DSL is a next step after a framework like Spring, he said. DSLs allow developers to express ideas in a concise way while objects, aspects, and generics become building blocks for a DSL, he said.

"You build a framework like Spring to handle aspects, but even something like Spring is getting complicated now," he said.

Language workbenches, such as Microsoft's Software Factories or JetBrains's MPS (Meta-Programming System), represent external DSLs, he said.

Join the newsletter!

Or

Sign up to gain exclusive access to email subscriptions, event invitations, competitions, giveaways, and much more.

Membership is free, and your security and privacy remain protected. View our privacy policy before signing up.

Error: Please check your email address.
Keep up with the latest tech news, reviews and previews by subscribing to the Good Gear Guide newsletter.

Paul Krill

InfoWorld
Show Comments

Brand Post

Most Popular Reviews

Latest Articles

Resources

PCW Evaluation Team

Tom Pope

Dynabook Portégé X30L-G

Ultimately this laptop has achieved everything I would hope for in a laptop for work, while fitting that into a form factor and weight that is remarkable.

Tom Sellers

MSI P65

This smart laptop was enjoyable to use and great to work on – creating content was super simple.

Lolita Wang

MSI GT76

It really doesn’t get more “gaming laptop” than this.

Jack Jeffries

MSI GS75

As the Maserati or BMW of laptops, it would fit perfectly in the hands of a professional needing firepower under the hood, sophistication and class on the surface, and gaming prowess (sports mode if you will) in between.

Taylor Carr

MSI PS63

The MSI PS63 is an amazing laptop and I would definitely consider buying one in the future.

Christopher Low

Brother RJ-4230B

This small mobile printer is exactly what I need for invoicing and other jobs such as sending fellow tradesman details or step-by-step instructions that I can easily print off from my phone or the Web.

Featured Content

Product Launch Showcase

Don’t have an account? Sign up here

Don't have an account? Sign up now

Forgot password?