[fpc-pascal] fast text processing

Vincent Snijders vsnijders at quicknet.nl
Thu Nov 1 22:24:53 CET 2007

Daniƫl Mantione schreef:
> Op Wed, 31 Oct 2007, schreef Vincent Snijders:
>> Florian Klaempfl schreef:
>>> Vincent Snijders schrieb:
>>> Why not SetLength(s,i)? StrLen is _very_ expensive. I don't see a way
>>> how another #0 can be before.
>> No more strlen:
>> http://www.hu.freepascal.org/fpcircbot/cgipastebin?msgid=1432
> One more possible speedup: Why are you using strlower and strlcomp instead 
> of lowercase/pos? The latter ones are probably faster and they don't care 
> of code pages which are not relevant in this example.

I think strlower is faster than lowercase, because it can do the change 
in place. Lowercase needs to allocate a new ansistring for the result.


More information about the fpc-pascal mailing list