On Tue, Jul 24, 2012 at 7:48 AM, Drake <[email protected]> wrote:
>
> + doesn’t matter if you do it once, but at one point this code is doing up
> to 15k +’s in a loop, and + doesn’t do efficient recycling of
> temporary/intermediary objects.

Did you even read the bytecode output I posted?  Seriously, I've never
met someone who is given all the right answers to the test but just
keeps insisting on the wrong answers anyways.

Try compiling these two classes.  They produce *identical* class files:

---- File m1/Stringy.java ----
public class Stringy {
        public static void main(String[] args) {
                String foo = "def";
                System.out.println("abc" + foo);
        }
}
---- File m2/Stringy.java ----
public class Stringy {
        public static void main(String[] args) {
                String foo = "def";
                System.out.println(new
StringBuilder().append("abc").append(foo).toString());
        }
}


If you don't believe me that the JVM lazy-loads classes, you can
either run some experiments with -XX:+TraceClassLoading or just spend
a few minutes with Google.  I've wasted enough time with this
discussion.


The honorable thing to do is apologize and star my issue:

http://code.google.com/p/googleappengine/issues/detail?id=7865

Jeff

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to