Tom Tromey wrote:
While investigating I realized that we would also lose a small
optimization related to String "+" operations.  When translating from
.java we currently use a non-synchronizing variant of StringBuffer to
do this.

In Java-5-mode I would expect ecj to use the unsynchronized
java.lang.StringBuilder.  If not, I'd consider it a bug.

A desirable optimization would be to convert local (non-escaping)
uses of StringBuffer/StringBuilder to be stack allocated.  You
could even stack-allocate the actual buffer up to a limited size,
only heap-allocating when it gets over that size.
--
        --Per Bothner
[EMAIL PROTECTED]   http://per.bothner.com/

Reply via email to