Link Details

Link 860593 thumbnail
User 1063913 avatar

By viniciusfbm
via guchex.com
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
  • 765
  • 1477

Comments

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)



    Spring Integration
    Written by: Soby Chacko
    Featured Refcardz: Top Refcardz:
    1. Search Patterns
    2. Python
    3. C++
    4. Design Patterns
    5. OO JS
    1. PhoneGap
    2. Spring Integration
    3. Regex
    4. Git
    5. Java