Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2019-11

StringList micro optimization

2 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

AlexeyT
Procedure TStrings.SetDelimitedText(const AValue: string);  has about 16
calls to Length(AValue), so make a variable NLen to speed up it.
Regards, Alexey

Reply by email

Michael Van Canneyt
to AlexeyT
AlexeyT wrote
Procedure TStrings.SetDelimitedText(const AValue: string);  has about 16 calls to Length(AValue), so make a variable NLen to speed up it.

Optimized, thanks for the hint.

Also reworked it so AddDelimitedText reuses DelimitedText code, no temp stringlist is created any more.

Michael.

Reply by email