On 27/11/2009, at 12:06 PM, Adam Heath wrote:

Scott Gray wrote:
Yeah +1 from me, I just wanted to make sure we had some tangible
benefits in mind and I didn't really see the dbcp library problem we had
as being a good reason for the switch since it was easily resolved.

Plus 1.6 hotspot is wicked smarter, and faster.

These sorts of improvements are available right now simply by running OFBiz on 1.6 though right?

==
void foo() {
        Object[] array = new Object[6];
        ...
        bar(array);
        ...
        return
}

void bar(Object[] array) {
        System.err.println(Arrays.toString(array));
}
==

Before java 1.6, array would be allocated on the heap, which requires
cross-thread locking, to ensure consistency.

In java 1.6, after appropriate jitting, it can detect that array never
leaves the any of the method scopes, so actually converts it to
allocate *on the stack*.  This means allocation and the eventual
deallocation is *wicked* fast.

This feature is called escape analysis.

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to