Link Details

Link 860593 thumbnail
User 1063913 avatar

By viniciusfbm
Published: Oct 09 2012 / 15:11

While most developers will agree that optimization comes after implementation, there are a number of common mistakes that can cause needless inefficiency and should really be caught before they make it to the code-base. One of these that I see fairly regularly in Java is the use of a String when a StringBuilder should be used instead.
  • 4
  • 0
  • 819
  • 1492


Add your comment
User 549881 avatar

Dinuka Arseculeratne replied ago:

0 votes Vote down Vote up Reply

I was just wondering, with the escape analysis and all the changes in the VM, does string concatenation really matter any more? because they are now created on the stack and disposed of after the method execution isnt it? Please correct me if i am wrong. Good write up nevertheless. Thx for sharing.

Add your comment

Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (4)

Voters Against This Link (0)

    Apache Hadoop
    Written by: Piotr Krewski
    Featured Refcardz: Top Refcardz:
    1. Play
    2. Akka
    3. Design Patterns
    4. OO JS
    5. Cont. Delivery
    1. Play
    2. Java Performance
    3. Akka
    4. REST
    5. Java