國文屋

位置:首頁 > 造句 > 

“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