Posted by editor
on October 26, 2005 at 7:04 AM PDT
Performance on the brain... Also:
Forum postings: Potential cost of pass-by-reference and cost of == when comparing Strings
Projects and Communities: JXTA considering Derby and JCP Elections
Also in Java Today: Synchronization optimizations in Mustang and the challenge from Ruby on Rails
Weblogs: MBean descriptors in JMX, juggling two IDE's, and CVS notification tool
Performance on the brain
An odd thing I noticed after posting the separate elements of today's page is how many of them are concerned with performance. JXTA developers are talking about switching to derby and wondering what the performance is like, there's an Also In Java Today article about optimizing synchronization performance, and both the featured forum posts are about Mustang performance issues and the expense of adding a proposed pass-by-reference feature and of the
== test performed as part of String comparisons.
Do you suppose developers are this performance-conscious in other languages, or has the Java community just gotten hypersensitive to the "Java is Slow" crowd that is so noisy on Slashdot and elsewhere?
In today's Forums ,
kcpeppe spells out performance costs of a proposed feature in
Re: Pass by reference - why not?
"Pass by reference is a valid programming model. That said it is not the Java programming model. To switch the Java programming model to pass by reference would break many things. Pass by reference is not safe and precludes one from making many of the assumptions that result in many of the speedups that we see from hotspot. Pass by reference may even break current GC. So this is not a matter of let the programmer decide."
Re: String.compareTo(String anotherString) ,
"As far as I can figure out Hotspot doesn't really use the Java version of compareTo(), it uses hand-optimized assembly. Even with all that, yes, the "==" comparison speeds up identical string comparisons. The trouble is it slows down every other string comparison, since the "==" check is executed for every string comparison. So the question becomes: in real programs (not artificial microbenchmarks), what percentage of String.compareTo calls really compare the exact same objects? A small percentage makes the extra check hurt more than help."
In Projects and
a recent post on the firstname.lastname@example.org list says that derby is being evaluated as a possible xindice replacement. This could enable a pluggable db architecture and enhancements to JXTA's query language. The thread asks those who've used derby to comment on its stability, scalability, performance, and resource consumption.
The nominations phase of the JCP 2005 Elections remains open to eligible members through Sunday, October 30. The Executive Committee guides the evolution of Java, and consists of both major stake-holders and other community members. All JCP JSPA 2 Members are eligible to take part in the election.
In Also in
Java Today , Brian Goetz writes
"Uncontended locking performance has improved with nearly every JVM version. Mustang continues this trend by improving both the raw performance of uncontended and contended locking and introducing optimizations that can eliminate many lock operations." In Synchronization optimizations in Mustang , Goetz looks at the two primary locking scenarios: locks that are heavily contended, and those that face little or no contention. "The JVM has separate code paths for contended ("slow path") and uncontended ("fast path") lock acquisition. A lot of effort has already gone into optimizing the fast path; Mustang further improves both the fast path and the slow path and adds a number of optimizations that can eliminate some locking entirely."
Ruby on Rails is emerging as a challenger to Java's dominance in building web applications -- the recently-released Beyond Java devotes two entire chapters to RoR, which it presents as a compelling combination for developing the kinds of web applications that have, at least until now, been the bread-and-butter of Java development. In the ONLamp article What Is Ruby on Rails , Curt Hibbs looks at the ideas behind RoR and how they contribute to high productivity and reduced development time.
Eamonn McManus shows off new JMX features in today's Weblogs . In
Adding Descriptors to MBeans in Mustang , he writes:
"Descriptors allow you to give additional information about MBeans to management clients. For example, a Descriptor on an MBean attribute might say what units it is measured in, or what its minimum and maximum possible values are. As of Mustang (Java SE 6), Descriptors are a basic part of the JMX API and are available in all types of MBeans. Here's the easiest way to use them."
Romain Guy is getting
Twice the IDE :
"Using Eclipse for the code, NetBeans for profiling, how cool is that? Well, it is, especially when you have a dual screen setup. I know a lot of developers do have such a setup today. Mine is a bit weird though..."
CVSspam: Very Cool CVS Notification Tool , Tom Ball writes:
"Code-reviews get a lot more automatic with this cool CVS notification tool."
In today's java.net
News Headlines :
Registered users can submit news items for the
href="http://today.java.net/today/news/">java.net News Page using our
form . All submissions go through an editorial review before being
posted to the site. You can also subscribe to the
href="http://today.java.net/pub/q/news_rss?x-ver=1.0">java.net News RSS
Current and upcoming Java
Registered users can submit event listings for the
href="http://www.java.net/events">java.net Events Page using our
href="http://today.java.net/cs/user/create/e"> events submission form.
All submissions go through an editorial review before being posted to the
Archives and Subscriptions: This blog is delivered weekdays as
Today RSS feed . Also, once this page is no longer featured as the
front page of java.net it will be
archived along with other past issues in the
Performance on the brain