3、如果知道要在單線程中構建字元串,就使用StringBuilder。
1、Isn't it time for some recycling, i.e. reusing the same global StringBuilder for every email received?
5、明確了這個基準測試的單線程化的本質後,我期待着逸出分析會消除鎖,從而將StringBuffer的*能提到了與StringBuilder相同的水平。
2、Make sure you use a StringBuilder and not individual string objects that get concatenated.
4、StringBuilder; one is immutable and changes to it cause the creation of a new copy, the other allows for in-place modification.