Here is my version, based on AthenaOfDelphi one

[pascal]function MyExplode(const src: string): TStringArray;
var
idx: Integer;
//len: Integer;
count: Integer;
CharPtr: PChar;
aChar : Char;
toklen: Integer;
f : Integer;
begin
CharPtr := Pointer(src);
if CharPtr = nil then Exit;
idx := 1;
f := 1;
//len := 0;

toklen := 10;
SetLength(Result, toklen);
count := 0;

while CharPtr^ <> #0 do
begin
aChar := CharPtr^;
Inc(CharPtr);

if (aChar = (' ')) or (aChar = (';')) or
(aChar = (',')) or (aChar = ('.')) or
(aChar = (':')) or (aChar = (#$0D)) or
(aChar = (#$0A)) then
begin
if (f <> 0) then
begin
if (count + 1 > toklen) then
begin
toklen := toklen + (toklen div 2);
SetLength(Result, toklen);
end;
Result[count] := Copy(src, f, idx - f);
f := idx + 1;
Inc(count);
end;
end;
Inc(idx);
//Inc(len);
end;

if (idx >= f) then // f < len
begin
if (count + 1 > toklen) then
begin
Inc(toklen);
SetLength(Result, toklen);
end;
Result[count] := Copy(src, f, MaxInt); // (len - f + 1)
Inc(count);
end;

if toklen > count then
SetLength(Result, count);
end;[/pascal]

- turned it into a function for cleaner code and to avoid passing a non empty tokens array to the procedure...
- changed src parameter to const
- used a PChar pointer and Inc() to navigate in src string
- removed length calculation
- concatenating a temp string is slow, so i used a "f" variable to track the locations and then Copy() to get the substrings

4 to 7 times faster than AthenaOfDelphi version

i don't think it can get much faster than this using only common optimizations

Arthur.