國文屋

位置:首頁 > 造句 > 

“StringBuffer”造句,怎麼用StringBuffer造句

造句2.71W

明確了這個基準測試的單線程化的本質後,我期待着逸出分析會消除鎖,從而將StringBuffer的*能提到了與StringBuilder相同的水平。

舉例來說,考慮一下線程安全的StringBuffer的用法。

Given the single threaded nature of this benchmark, I was fully expecting Escape Analysis to elide the lock thus rendering StringBuffer performance equivalent to that of StringBuilder.

爲創建串聯的字元串 “ssRights” ,編譯器將創建一個臨時的StringBuffer對象,調用StringBuffernd 三次,然後調用StringBufferring ,這意味着至少兩個對象的創建和幾個方法調用。

對String和StringBuffer來說,完成測評所需要的時間隨着計劃長度的增加呈指數級增長。

StringBuffer造句

However, there is a performance penalty here, since a StringBuffer must work to transparently increase its size and shift the data around.

標籤:StringBuffer 造句