News for hackers. Stuff that matters.
Re:5 Coding Hacks to Reduce GC Overhead by jbert on Thursday July 18, 2013 @10:13AM (#6063728)
Why should the manually managing your stringbuilders be preferable to having the compiler do it for you? The example given is:

  String result = foo() + arg;
  result += boo();
  System.out.println(“result = “ + result);
creates 3 StringBuilders. I would have thought that it wouldn't be particularly hard to track that the input to subsequent "+" was the output of a previous stringbuilder, allowing easy re-use?

There are no comments on this comment yet.