[fpc-pascal] fast text processing

Marco van de Voort marcov at stack.nl
Wed Oct 31 11:49:15 CET 2007


> > If you just want to show off, the easiest is simply making a FPC header to
> > pcre, it might be useful even.
> 
> Someone had worked on it using Delphi7 and PCRE. A little optimization 
> is done on the TStringList, it uses CompareText instead of CompareStr 
> for text comparison. It does faster than my program (using fpc and the 
> default TStringList), but still about 40% slower than Perl. Plus, the 
> program depends on PCRE library. :(

(Probably the other way around, but that breaks MBCS (Delphi) and UTF-8(FPC)
compability, and the internationalization of your GUI. So that is not
something safe to do)

You are not the first to optimize TStringList in this way, and will not the
last. There are reasons why TStringList is as it is.



More information about the fpc-pascal mailing list