Juha Manninen schrieb:

Splitting can be slow. It creates and copies strings and allocates small chunks of memory.

No way around that, unless you use PChars and zero terminated strings, which are slow in any further processing.

There should be variations for those functions. Sometimes you want to support quoted stings, sometimes not.

See StrictDelimiter.

Sometimes you want TStrings, sometimes an array of string (which allows more optimization).

TStrings allows for the same optimization, when you use [Set]Capacity instead of SetLength. Once configured for the expected field count, the TStrings object can be reused like an array.

DoDi


--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to