When and Why Should I Use TStringBuilder?

前端 未结 6 1535
你的背包
你的背包 2020-12-31 05:51

I converted my program from Delphi 4 to Delphi 2009 a year ago, mainly to make the jump to Unicode, but also to gain the benefits of all those years of Delphi improvements.<

6条回答
  •  梦毁少年i
    2020-12-31 06:31

    To the best of my knowledge TStringBuilder was introduced just for some parity with .NET and Java, it seems to be more of a tick the box type feature than any major advance.

    Consensus seems to be that TStringBuilder is faster in some operations but slower in others.

    Your program sounds like an interesting one to do a before/after TStringBuilder comparison with but I wouldn't do it other than as an academic exercise.

提交回复
热议问题